tree-eh.c (tree_could_trap_p): Allow non-constant floating point trapping divide.

2005-04-02  David Edelsohn  <edelsohn@gnu.org>
            Daniel Jacobowitz  <dan@codesourcery.com>

        * tree-eh.c (tree_could_trap_p): Allow non-constant floating point
        trapping divide.
        * rtlanal.c (may_trap_p): Same.

Co-Authored-By: Daniel Jacobowitz <dan@codesourcery.com>

From-SVN: r97582
This commit is contained in:
David Edelsohn 2005-04-04 22:50:53 +00:00 committed by David Edelsohn
parent 57e921bc60
commit f90130752f
3 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2005-04-04 David Edelsohn <edelsohn@gnu.org>
Daniel Jacobowitz <dan@codesourcery.com>
* tree-eh.c (tree_could_trap_p): Allow non-constant floating point
trapping divide.
* rtlanal.c (may_trap_p): Same.
2005-04-04 Dale Johannesen <dalej@apple.com>
* ChangeLog: remove reference to ChangeLog.12.

View File

@ -2105,11 +2105,9 @@ may_trap_p (rtx x)
case UMOD:
if (HONOR_SNANS (GET_MODE (x)))
return 1;
if (! CONSTANT_P (XEXP (x, 1))
|| (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT
&& flag_trapping_math))
return 1;
if (XEXP (x, 1) == const0_rtx)
if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
return flag_trapping_math;
if (!CONSTANT_P (XEXP (x, 1)) || (XEXP (x, 1) == const0_rtx))
return 1;
break;

View File

@ -1787,8 +1787,8 @@ tree_could_trap_p (tree expr)
case RDIV_EXPR:
if (honor_snans || honor_trapv)
return true;
if (fp_operation && flag_trapping_math)
return true;
if (fp_operation)
return flag_trapping_math;
t = TREE_OPERAND (expr, 1);
if (!TREE_CONSTANT (t) || integer_zerop (t))
return true;