diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2005-10-19 03:34:50 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2005-10-19 03:34:50 +0000 |
commit | b3e2e29c19d3a3b8fae32db9cbec787d675b13f2 (patch) | |
tree | 01634c8307640767e543dba4724d506583a77332 /gcc/tree-ssa-pre.c | |
parent | fd4aca960b65ab4749712571057ab955385fe8b5 (diff) | |
download | gcc-b3e2e29c19d3a3b8fae32db9cbec787d675b13f2.zip gcc-b3e2e29c19d3a3b8fae32db9cbec787d675b13f2.tar.gz gcc-b3e2e29c19d3a3b8fae32db9cbec787d675b13f2.tar.bz2 |
re PR tree-optimization/24231 (SSA corruption with C++ code and exceptions and loads)
2005-10-18 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/24231
* tree-ssa-pre.c (try_look_through_load): Skip abnormal phi names
(compute_avail): Ditto.
From-SVN: r105594
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index b0e7953..425d220 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -2187,11 +2187,13 @@ try_look_through_load (tree lhs, tree mem_ref, tree stmt, basic_block block) that all of them come from the same statement STORE_STMT. See if there is a useful expression we can deduce from STORE_STMT. */ rhs = TREE_OPERAND (store_stmt, 1); - if (TREE_CODE (rhs) == SSA_NAME + if ((TREE_CODE (rhs) == SSA_NAME + && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs)) || is_gimple_min_invariant (rhs) || TREE_CODE (rhs) == ADDR_EXPR || TREE_INVARIANT (rhs)) { + /* Yay! Compute a value number for the RHS of the statement and add its value to the AVAIL_OUT set for the block. Add the LHS to TMP_GEN. */ @@ -2322,7 +2324,8 @@ compute_avail (void) continue; } } - else if (TREE_CODE (rhs) == SSA_NAME + else if ((TREE_CODE (rhs) == SSA_NAME + && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs)) || is_gimple_min_invariant (rhs) || TREE_CODE (rhs) == ADDR_EXPR || TREE_INVARIANT (rhs) |