Files
clang-p2996/llvm/lib/CodeGen/CodeGenPrepare.cpp
Craig Topper 697a28b380 [CodeGenPrepare][RISCV] Correct the MathUsed flag for shouldFormOverflowOp
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 the math is
used if the sub has any users.

This regresses RISC-V which I will work on other patches for.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D146786
2023-03-27 09:58:50 -07:00

321 KiB