https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78857
--- Comment #1 from Andreas Krebbel <krebbel at gcc dot gnu.org> --- Author: krebbel Date: Mon Mar 20 09:33:11 2017 New Revision: 246274 URL: https://gcc.gnu.org/viewcvs?rev=246274&root=gcc&view=rev Log: 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 <kreb...@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 <kreb...@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. Added: trunk/gcc/testsuite/gcc.target/s390/load-and-test-fp-1.c trunk/gcc/testsuite/gcc.target/s390/load-and-test-fp-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/s390/s390.md trunk/gcc/testsuite/ChangeLog