[llvm] e6a007f - [RISCV] Use getConstantOperandVal. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 17 11:00:33 PDT 2023
Author: Craig Topper
Date: 2023-09-17T10:53:50-07:00
New Revision: e6a007f6b51a661ed3dd8b0210b734b3e9b4354f
URL: https://github.com/llvm/llvm-project/commit/e6a007f6b51a661ed3dd8b0210b734b3e9b4354f
DIFF: https://github.com/llvm/llvm-project/commit/e6a007f6b51a661ed3dd8b0210b734b3e9b4354f.diff
LOG: [RISCV] Use getConstantOperandVal. NFC
Added:
Modified:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index eae42d4b73332ed..52b19ce7a228dbe 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -5009,8 +5009,7 @@ SDValue RISCVTargetLowering::LowerIS_FPCLASS(SDValue Op,
SDLoc DL(Op);
MVT VT = Op.getSimpleValueType();
MVT XLenVT = Subtarget.getXLenVT();
- auto CNode = cast<ConstantSDNode>(Op.getOperand(1));
- unsigned Check = CNode->getZExtValue();
+ unsigned Check = Op.getConstantOperandVal(1);
unsigned TDCMask = 0;
if (Check & fcSNan)
TDCMask |= RISCV::FPMASK_Signaling_NaN;
More information about the llvm-commits
mailing list