rs6000: Don't split FP comparisons at expand time
authorSegher Boessenkool <segher@kernel.crashing.org>
Thu, 21 Nov 2019 18:14:28 +0000 (19:14 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Thu, 21 Nov 2019 18:14:28 +0000 (19:14 +0100)
commiteb5485341b9ded93334b9726f8309093df03587b
tree554af153a8113acdae4b89e39d6015ab11c52919
parent557532d1728af193d47867dabbe26bd556fb8586
rs6000: Don't split FP comparisons at expand time

We currently expand various floating point comparisons early, to some
sequences with cror insns and the like.  This doesn't optimize well.

Change that to allow any of the 14 floating point comparisons in the
instruction stream, and split them after combine (at split1).

* config/rs6000/predicates.md (extra_insn_branch_comparison_operator):
New predicate.
* config/rs6000/rs6000-protos.h (rs6000_emit_fp_cror): New declaration.
* config/rs6000/rs6000.c (rs6000_generate_compare): Don't do anything
special for FP comparisons that need a cror instruction eventually.
(rs6000_emit_fp_cror): New function.
(rs6000_emit_sCOND): Expand all floating point comparisons to one
instruction, for normal FP modes, with HONOR_NANS.
(rs6000_emit_cbranch): Reformat.
* config/rs6000/rs6000.md (fp_rev): New iterator.
(fp_two): New iterator.
*<code><mode>_cc for fp_rev and GPR: New define_insn_and_split.
*<code><mode>_cc for fp_two and GPR: New define_insn_and_split.
*cbranch_2insn: New define_insn_and_split.

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