[RISCV][NFC] Use defined variable instead some code.
authorwanglian <Lian.Wang@streamcomputing.com>
Tue, 2 Aug 2022 07:59:27 +0000 (15:59 +0800)
committerwanglian <Lian.Wang@streamcomputing.com>
Tue, 2 Aug 2022 08:26:33 +0000 (16:26 +0800)
Reviewed By: asb

Differential Revision: https://reviews.llvm.org/D130687

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

index 518f2b1..d89f6b9 100644 (file)
@@ -8370,7 +8370,7 @@ static SDValue performSETCCCombine(SDNode *N, SelectionDAG &DAG,
   if (!isIntEqualitySetCC(Cond))
     return SDValue();
 
-  const APInt &C1 = cast<ConstantSDNode>(N1)->getAPIntValue();
+  const APInt &C1 = N1C->getAPIntValue();
 
   SDLoc dl(N);
   // If the constant is larger than 2^32 - 1 it is impossible for both sides