diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2004-09-24 13:26:29 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2004-09-24 06:26:29 -0700 |
commit | 54e075fe1e9c8b58253ed51df15b3039d7c3053a (patch) | |
tree | 58c2501c3ecaa6e0b9dc6365590dbe4096a9f698 | |
parent | 7e53ab66059c0faf5afb746ddee5da9a14b8b43e (diff) | |
download | gcc-54e075fe1e9c8b58253ed51df15b3039d7c3053a.zip gcc-54e075fe1e9c8b58253ed51df15b3039d7c3053a.tar.gz gcc-54e075fe1e9c8b58253ed51df15b3039d7c3053a.tar.bz2 |
re PR tree-optimization/17624 (ICE: SSA corruption (another one))
2004-09-24 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/17624
* tree-ssa-forwprop.c (record_single_argument_cond_exprs):
Reject if any of the operands occur in an abnormal PHI.
From-SVN: r88032
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 30 |
2 files changed, 36 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b2f6bf7..aac77b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-09-24 Andrew Pinski <pinskia@physics.uc.edu> + + PR tree-opt/17624 + * tree-ssa-forwprop.c (record_single_argument_cond_exprs): + Reject if any of the operands occur in an abnormal PHI. + 2004-09-24 Andreas Schwab <schwab@suse.de> * tree-ssa-dom.c (record_range): Fix violation of strict aliasing diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 619cab0..cbf1fde 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -212,6 +212,11 @@ record_single_argument_cond_exprs (varray_type cond_worklist, || !CONSTANT_CLASS_P (op1) || !INTEGRAL_TYPE_P (TREE_TYPE (op1))) continue; + + /* Don't propagate if the first operand occurs in + an abnormal PHI. */ + if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op0)) + continue; } /* These cases require comparisons of a naked SSA_NAME or @@ -235,6 +240,18 @@ record_single_argument_cond_exprs (varray_type cond_worklist, || (TREE_CODE (op1) != SSA_NAME && !is_gimple_min_invariant (op1))) continue; + + /* Don't propagate if the first operand occurs in + an abnormal PHI. */ + if (TREE_CODE (op0) == SSA_NAME + && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op0)) + continue; + + /* Don't propagate if the second operand occurs in + an abnormal PHI. */ + if (TREE_CODE (op1) == SSA_NAME + && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op1)) + continue; } /* If TEST_VAR is set from a TRUTH_NOT_EXPR, then it @@ -247,6 +264,12 @@ record_single_argument_cond_exprs (varray_type cond_worklist, if (TREE_CODE (def_rhs) != SSA_NAME && !is_gimple_min_invariant (def_rhs)) continue; + + /* Don't propagate if the operand occurs in + an abnormal PHI. */ + if (TREE_CODE (def_rhs) == SSA_NAME + && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (def_rhs)) + continue; } /* If TEST_VAR was set from a cast of an integer type @@ -268,6 +291,13 @@ record_single_argument_cond_exprs (varray_type cond_worklist, ; else continue; + + /* Don't propagate if the operand occurs in + an abnormal PHI. */ + if (TREE_CODE (TREE_OPERAND (def_rhs, 0)) == SSA_NAME + && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (TREE_OPERAND + (def_rhs, 0))) + continue; } else continue; |