Skip to content
Commit 697a28b3 authored by Craig Topper's avatar Craig Topper
Browse files

[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
parent 9b957b12
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment