[PATCH] D132373: [RISCV] When ISD::SETUGT && Imm == -1, processed before lowering
LiqinWeng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 22 06:03:54 PDT 2022
Miss_Grape created this revision.
Miss_Grape added a reviewer: craig.topper.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, frasercrmck, 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.
Miss_Grape requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, jacquesguan, MaskRay.
Herald added a project: LLVM.
https://reviews.llvm.org/D132373
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
@@ -3636,10 +3636,6 @@
if (isa<ConstantSDNode>(RHS)) {
int64_t Imm = cast<ConstantSDNode>(RHS)->getSExtValue();
if (Imm != 0 && isInt<12>((uint64_t)Imm + 1)) {
- // If this is an unsigned compare and the constant is -1, incrementing
- // the constant would change behavior. The result should be false.
- if (CCVal == ISD::SETUGT && Imm == -1)
- return DAG.getConstant(0, DL, VT);
// Using getSetCCSwappedOperands will convert SET(U)GT->SET(U)LT.
CCVal = ISD::getSetCCSwappedOperands(CCVal);
SDValue SetCC = DAG.getSetCC(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132373.454472.patch
Type: text/x-patch
Size: 832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220822/30da120f/attachment.bin>
More information about the llvm-commits
mailing list