diff options
author | Alex Bradbury <asb@igalia.com> | 2024-01-09 14:27:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-09 14:27:07 +0000 |
commit | 2d54ec36f762a081c9f17cacd3407cc6f35622b1 (patch) | |
tree | 88fde7b2a6b2c0b5267fc30f2405dffe560e0b24 /llvm/utils/TableGen/CodeGenDAGPatterns.cpp | |
parent | 7c00a5be5cdeb34711a546054ba0aa89c26d14eb (diff) | |
download | llvm-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/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index e481f7e..f88e25e 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -1368,7 +1368,7 @@ std::string TreePredicateFn::getCodeToRunOnSDNode() const { if (immCodeUsesAPFloat()) Result += "cast<ConstantFPSDNode>(Node)->getValueAPF();\n"; else if (immCodeUsesAPInt()) - Result += "cast<ConstantSDNode>(Node)->getAPIntValue();\n"; + Result += "Node->getAsAPIntVal();\n"; else Result += "cast<ConstantSDNode>(Node)->getSExtValue();\n"; return Result + ImmCode; |