[llvm] e4a6be0 - [CodeGen] Use getConstantOperandVal (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 13 18:19:01 PST 2024
Author: Kazu Hirata
Date: 2024-01-13T18:18:51-08:00
New Revision: e4a6be0fc0b8dcc57c555baa6dea0097c5fb0f7b
URL: https://github.com/llvm/llvm-project/commit/e4a6be0fc0b8dcc57c555baa6dea0097c5fb0f7b
DIFF: https://github.com/llvm/llvm-project/commit/e4a6be0fc0b8dcc57c555baa6dea0097c5fb0f7b.diff
LOG: [CodeGen] Use getConstantOperandVal (NFC)
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 296ed3a3c3dc11..adfeea073bff65 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -3534,8 +3534,7 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) {
Results.push_back(ExpandFABS(Node));
break;
case ISD::IS_FPCLASS: {
- auto CNode = cast<ConstantSDNode>(Node->getOperand(1));
- auto Test = static_cast<FPClassTest>(CNode->getZExtValue());
+ auto Test = static_cast<FPClassTest>(Node->getConstantOperandVal(1));
if (SDValue Expanded =
TLI.expandIS_FPCLASS(Node->getValueType(0), Node->getOperand(0),
Test, Node->getFlags(), SDLoc(Node), DAG))
More information about the llvm-commits
mailing list