aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
diff options
context:
space:
mode:
authorAlex Bradbury <asb@igalia.com>2024-01-09 14:27:07 +0000
committerGitHub <noreply@github.com>2024-01-09 14:27:07 +0000
commit2d54ec36f762a081c9f17cacd3407cc6f35622b1 (patch)
tree88fde7b2a6b2c0b5267fc30f2405dffe560e0b24 /llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
parent7c00a5be5cdeb34711a546054ba0aa89c26d14eb (diff)
downloadllvm-2d54ec36f762a081c9f17cacd3407cc6f35622b1.zip
llvm-2d54ec36f762a081c9f17cacd3407cc6f35622b1.tar.gz
llvm-2d54ec36f762a081c9f17cacd3407cc6f35622b1.tar.bz2
[SelectionDAG] Add and use SDNode::getAsAPIntVal() helper (#77455)
This is the logical equivalent for #76710 for APInt and uses the same naming scheme. Converted existing users through: `git grep -l "cast<ConstantSDNode>\(.*\).*getAPIntValueValue" | xargs sed -E -i 's/cast<ConstantSDNode>\((.*)\)->getAPIntValue/\1->getAsAPIntVal/'`
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
index 320f91c..815eca1 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
@@ -1649,7 +1649,7 @@ void SystemZDAGToDAGISel::Select(SDNode *Node) {
}
}
if (Node->getValueType(0) == MVT::i128) {
- const APInt &Val = cast<ConstantSDNode>(Node)->getAPIntValue();
+ const APInt &Val = Node->getAsAPIntVal();
SystemZVectorConstantInfo VCI(Val);
if (VCI.isVectorConstantLegal(*Subtarget)) {
loadVectorConstant(VCI, Node);