aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwanglian <Lian.Wang@streamcomputing.com>2022-08-02 15:59:27 +0800
committerTom Stellard <tstellar@redhat.com>2022-08-05 01:12:26 -0700
commit98411113094fe93e3124f2db9d7a99cf03b8bdb3 (patch)
tree2c99fdc52d3035e33ab692ba374fb8d91231905d
parentb8f8e4530c47754f0384c9a824ae9917a449436c (diff)
[RISCV][NFC] Use defined variable instead some code.
Reviewed By: asb Differential Revision: https://reviews.llvm.org/D130687 (cherry picked from commit e208bab55fb11a69931a02dec8583a8ec5f94bbf)
-rw-r--r--llvm/lib/Target/RISCV/RISCVISelLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index baa19e81e436..8fe49a90994f 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -8199,7 +8199,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