rs6000: Workaround for PR98092
authorSegher Boessenkool <segher@kernel.crashing.org>
Tue, 16 Mar 2021 18:29:11 +0000 (18:29 +0000)
committerSegher Boessenkool <segher@kernel.crashing.org>
Tue, 16 Mar 2021 19:21:34 +0000 (19:21 +0000)
commita0b5843a9b2b3e93bd119d5aef583f53ad2ef0bc
tree01e99c1039f3cc3ec2ae3e3c4cf07d1cbe950467
parentd55ce33a34a8e33d17285228b32cf1e564241a70
rs6000: Workaround for PR98092

The bcdinvalid_<mode> RTL instruction uses the "unordered" comparison,
which cannot be used if we have -ffinite-math-only.  We really need
CCMODEs that describe what bits in a CR field are set by other insns
than just comparisons, but that is a lot more surgery, and it is stage 4
now.  This patch does a simple workaround.

2021-03-16  Segher Boessenkool  <segher@kernel.crashing.org>

PR target/98092
* config/rs6000/predicates.md (branch_comparison_operator): Allow
ordered and unordered for CCFPmode, if flag_finite_math_only.

gcc/testsuite/
PR target/98092
* gcc.target/powerpc/pr98092.c: New.
gcc/config/rs6000/predicates.md
gcc/testsuite/gcc.target/powerpc/pr98092.c [new file with mode: 0644]