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

[RISCV] Remove C!=0 restriction from (sub C, (setcc x, y, eq/neq)) -> (add...

[RISCV] Remove C!=0 restriction from (sub C, (setcc x, y, eq/neq)) -> (add C-1, (setcc x, y, neq/eq)).

While (sub 0, X) can use x0 for the 0, I believe (add X, -1) is
still preferrable. (addi X, -1) can be compressed, sub with x0 on
the LHS is never compressible.
parent e858f512
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment