[PATCH] D130687: [RISCV][NFC] Use defined variable instead some code.

WangLian via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 01:06:53 PDT 2022


Jimerlife created this revision.
Jimerlife added reviewers: craig.topper, frasercrmck, benshi001.
Jimerlife added a project: LLVM.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
Jimerlife requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, jacquesguan, MaskRay.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130687

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp


Index: llvm/lib/Target/RISCV/RISCVISelLowering.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -8203,7 +8203,7 @@
   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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130687.448255.patch
Type: text/x-patch
Size: 499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220728/126c4a85/attachment.bin>


More information about the llvm-commits mailing list