summaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-12 21:23:04 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-12 21:23:04 +0000
commit27ea6d288aa386d0dc590f78a4569d09fac3eb8c (patch)
tree1c83248ee4b0f3902f9acfb00de3cf4189a1bc8b /gcc/rtlanal.c
parent1c9e0d10e988f3b96719e45729edef18148b6198 (diff)
downloadgcc-27ea6d288aa386d0dc590f78a4569d09fac3eb8c.tar.gz
Fix for ia64-linux glibc miscompilation of nan tests.
* rtlanal.c (may_trap_p): Check operand modes of LE, LT, GE, and GT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38209 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 88b49fe649e..073f37c438c 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -1947,8 +1947,16 @@ may_trap_p (x)
certainly may trap. */
return 1;
+ case GE:
+ case GT:
+ case LE:
+ case LT:
case COMPARE:
- /* Any floating comparison may trap. */
+ /* Some floating point comparisons may trap. */
+ /* ??? There is no machine independent way to check for tests that trap
+ when COMPARE is used, though many targets do make this distinction.
+ For instance, sparc uses CCFPE for compares which generate exceptions
+ and CCFP for compares which do not generate exceptions. */
if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
return 1;
/* But often the compare has some CC mode, so check operand