Fix for ia64-linux glibc miscompilation of nan tests.

* rtlanal.c (may_trap_p): Check operand modes of LE, LT, GE, and GT.

From-SVN: r38209
This commit is contained in:
Jim Wilson 2000-12-12 13:23:04 -08:00
parent f2beb7ef55
commit 734508eae5
1 changed files with 9 additions and 1 deletions

View 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