[PATCH] D146786: [CodeGenPrepare][RISCV] Correct the MathUsed flag for shouldFormOverflowOp
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 23 23:51:48 PDT 2023
craig.topper created this revision.
craig.topper added reviewers: reames, nikic, spatel, liaolucy.
Herald added subscribers: jobnoorman, luke, VincentWu, 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.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
For add, if we match the constant edge case the add isn't used by
the compare so we shouldn't check for 2 users.
For sub, the compare is not a user of the sub so if the sub exists
at all the math is used.
This regresses RISC-V which I will work on other patches for.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146786
Files:
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/CodeGen/RISCV/overflow-intrinsics.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146786.507972.patch
Type: text/x-patch
Size: 5136 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230324/cad23d9f/attachment.bin>
More information about the llvm-commits
mailing list