rs6000: Improve scc isel
authorSegher Boessenkool <segher@kernel.crashing.org>
Tue, 28 Nov 2017 00:17:16 +0000 (01:17 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Tue, 28 Nov 2017 00:17:16 +0000 (01:17 +0100)
commitfd8bf76c908297f96f240954c43732579bb95105
tree3139451e525e77a0975c2114c48e110f3722dd21
parent2ac1a8d832dbaad726cc5f787646ff20c9b05aeb
rs6000: Improve scc isel

If we have a negative condition we can use a literal 0 in the isel,
instead of having to load it into a register.  If the condition is from
a comparison with an immediate we can change e.g. LT to LE and adjust
the immediate, saving a li instruction.

* config/rs6000/rs6000.md (<code><GPR:mode><GPR2:mode>2_isel): Change
LT/GT/LTU/GTU to LE/GE/LEU/GEU where possible.

From-SVN: r255186
gcc/ChangeLog
gcc/config/rs6000/rs6000.md