Use getConstantOperandVal(Num) API instead of cast<ConstantSDNode>(N->getOperand(Num))->getZExtValue().
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp | ||
---|---|---|
2367 ↗ | (On Diff #451712) | Not sure that I like that we repeated the "1" here when we already have Idx. It's potentially more code too since we need to dereference N again. |
llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp | ||
---|---|---|
2367 ↗ | (On Diff #451712) | +1 We've tended to avoid using getConstantOperand helpers when we're also accessing the raw getOperand() variant - probably just do this in cases where we can then remove the getOperand call |
Comment Actions
Only use getConstantOperandVal(Num) API instead of cast<ConstantSDNode>(N->getOperand(Num))->getZExtValue(). If We already have Idx, still keeping origin cast form. Thanks your suggestions @craig.topper @RKSimon.