Skip to content

Commit e4a6be0

Browse files
[CodeGen] Use getConstantOperandVal (NFC)
1 parent b5d6ea4 commit e4a6be0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3534,8 +3534,7 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) {
35343534
Results.push_back(ExpandFABS(Node));
35353535
break;
35363536
case ISD::IS_FPCLASS: {
3537-
auto CNode = cast<ConstantSDNode>(Node->getOperand(1));
3538-
auto Test = static_cast<FPClassTest>(CNode->getZExtValue());
3537+
auto Test = static_cast<FPClassTest>(Node->getConstantOperandVal(1));
35393538
if (SDValue Expanded =
35403539
TLI.expandIS_FPCLASS(Node->getValueType(0), Node->getOperand(0),
35413540
Test, Node->getFlags(), SDLoc(Node), DAG))

0 commit comments

Comments
 (0)