This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/78857] S390: Do not use load-and-test floating-point instruction to compare against 0.0 as SNaN is converted to QNaN.
- From: "krebbel at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Mar 2017 09:33:45 +0000
- Subject: [Bug target/78857] S390: Do not use load-and-test floating-point instruction to compare against 0.0 as SNaN is converted to QNaN.
- Auto-submitted: auto-generated
- References: <bug-78857-4@http.gcc.gnu.org/bugzilla/>
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 <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.
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