S/390: PR78857: Don't use load and test if result is live.
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Mon, 20 Mar 2017 09:33:11 +0000 (09:33 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Mon, 20 Mar 2017 09:33:11 +0000 (09:33 +0000)
commite325aba2a7c44778ab5233dcb4c9bd010837f2b7
tree847bd59b1f3c3df6fda4292ba44e72ac9fff3f69
parenta4dfaae1051ed23cea9aefaefdef156d0f02c1cd
S/390: PR78857: Don't use load and test if result is live.

The FP load and test instruction should not be used for a comparison
if the target operand is being used afterwards.  It unfortunately
turns SNaNs into QNaNs.

gcc/ChangeLog:

2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

PR target/78857
* config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
target operand.  A new splitter adds the clobber statement in case
the target operand is dead anyway.

gcc/testsuite/ChangeLog:

2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

PR target/78857
* gcc.target/s390/load-and-test-fp-1.c: New test.
* gcc.target/s390/load-and-test-fp-2.c: New test.

From-SVN: r246274
gcc/ChangeLog
gcc/config/s390/s390.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/load-and-test-fp-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/load-and-test-fp-2.c [new file with mode: 0644]