rs6000: Improve isel
authorSegher Boessenkool <segher@kernel.crashing.org>
Wed, 11 Oct 2017 22:40:52 +0000 (00:40 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Wed, 11 Oct 2017 22:40:52 +0000 (00:40 +0200)
commite7d77cf92d5b27a7e85a39b9cbf6562e34848728
tree8b8a50a42198cf97bc97905b6466a495a58a9126
parent3ff1b2b0a91e25bf5b6499025a7c336a0b71b75f
rs6000: Improve isel

This removes output_isel.  Instead, the define_insn's now output the
isel instructions directly.

It adds a reg_or_zero operand predicate, too, because the reg_or_cint
predicate is too lax here.  Also use it in the "reversed" variants of
the instructions.

* config/rs6000/predicates.md (zero_constant, all_ones_constant):
Move up in file.
(reg_or_cint_operand): Fix comment.
(reg_or_zero_operand): New predicate.
* config/rs6000/rs6000-protos.h (output_isel): Delete.
* config/rs6000/rs6000.c (output_isel): Delete.
* config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
instead of reg_or_cint_operand.  Output instruction directly (not via
output_isel).
(isel_unsigned_<mode>): Ditto.
(*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
gpc_reg_operand.  Add an instruction alternative for this.  Output
instruction directly.
(*isel_reversed_unsigned_<mode>): Ditto.

From-SVN: r253665
gcc/ChangeLog
gcc/config/rs6000/predicates.md
gcc/config/rs6000/rs6000-protos.h
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md