diff options
author | Rafael Avila de Espindola <espindola@google.com> | 2008-05-08 22:16:59 +0000 |
---|---|---|
committer | Rafael Espindola <espindola@gcc.gnu.org> | 2008-05-08 22:16:59 +0000 |
commit | 04b03edb56633f6e77d7834022d4e49a74f3cce5 (patch) | |
tree | 465e7779ecfa60e33ba35e94156083288329e034 /gcc/tree-gimple.c | |
parent | 96c92f4763242fbf74d70ca52dc5ebecc3c0ce95 (diff) | |
download | gcc-04b03edb56633f6e77d7834022d4e49a74f3cce5.zip gcc-04b03edb56633f6e77d7834022d4e49a74f3cce5.tar.gz gcc-04b03edb56633f6e77d7834022d4e49a74f3cce5.tar.bz2 |
tree-complex.c (expand_complex_div_wide): Don't create CONDs that trap.
* tree-complex.c (expand_complex_div_wide): Don't create CONDs that
trap.
* tree-gimple.c (is_gimple_condexpr): Check that the expression doesn't
trap and that both operands are gimple values.
(canonicalize_cond_expr_cond): Use is_gimple_condexpr.
* gcc/tree-eh.c (tree_could_trap_p): Correctly detect if a comparison
is a fp operation.
* gcc/testsuite/gcc.dg/vect/vect-111.c: Rename to no-trapping-math-vect-111.c
* gcc/testsuite/gcc.dg/vect/vect-ifcvt-11.c: Rename to no-trapping-math-vect-ifcvt-11.c
* gcc/testsuite/gcc.dg/vect/vect-ifcvt-12.c: Rename to no-trapping-math-vect-ifcvt-12.c
* gcc/testsuite/gcc.dg/vect/vect-ifcvt-13.c: Rename to no-trapping-math-vect-ifcvt-13.c
* gcc/testsuite/gcc.dg/vect/vect-ifcvt-14.c: Rename to no-trapping-math-vect-ifcvt-14.c
* gcc/testsuite/gcc.dg/vect/vect-ifcvt-15.c: Rename to no-trapping-math-vect-ifcvt-15.c
From-SVN: r135093
Diffstat (limited to 'gcc/tree-gimple.c')
-rw-r--r-- | gcc/tree-gimple.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/tree-gimple.c b/gcc/tree-gimple.c index 433c294..101dfd1 100644 --- a/gcc/tree-gimple.c +++ b/gcc/tree-gimple.c @@ -155,7 +155,10 @@ is_gimple_lvalue (tree t) bool is_gimple_condexpr (tree t) { - return (is_gimple_val (t) || COMPARISON_CLASS_P (t)); + return (is_gimple_val (t) || (COMPARISON_CLASS_P (t) + && !tree_could_trap_p (t) + && is_gimple_val (TREE_OPERAND (t, 0)) + && is_gimple_val (TREE_OPERAND (t, 1)))); } /* Return true if T is something whose address can be taken. */ @@ -648,12 +651,7 @@ canonicalize_cond_expr_cond (tree t) TREE_OPERAND (top0, 0), TREE_OPERAND (top0, 1)); } - /* A valid conditional for a COND_EXPR is either a gimple value - or a comparison with two gimple value operands. */ - if (is_gimple_val (t) - || (COMPARISON_CLASS_P (t) - && is_gimple_val (TREE_OPERAND (t, 0)) - && is_gimple_val (TREE_OPERAND (t, 1)))) + if (is_gimple_condexpr (t)) return t; return NULL_TREE; |