Fix for ia64-linux glibc miscompilation of nan tests.
[gcc.git] / gcc / rtlanal.c
index 88b49fe649eff498ec0da97dc8c1d40d0b45c47d..073f37c438c8ab683351f3571a763165c85f465e 100644 (file)
@@ -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