diff options
author | David Edelsohn <edelsohn@gnu.org> | 2005-04-04 22:50:53 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2005-04-04 18:50:53 -0400 |
commit | f90130752f21c4cfc1720bc875b8a23ea95afec6 (patch) | |
tree | 580801882cf8a84ce5d18bc451fb32a0356dfeb0 /gcc | |
parent | 57e921bc604c8ba9ca7a5ed3d9f4af178ea803ed (diff) | |
download | gcc-f90130752f21c4cfc1720bc875b8a23ea95afec6.zip gcc-f90130752f21c4cfc1720bc875b8a23ea95afec6.tar.gz gcc-f90130752f21c4cfc1720bc875b8a23ea95afec6.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/rtlanal.c | 8 | ||||
-rw-r--r-- | gcc/tree-eh.c | 4 |
3 files changed, 12 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2a114c5..36608c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 0686af8..da9774e 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -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; diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index ab945ff..3dbcfa8 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -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; |