diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-30 08:53:22 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-30 08:53:22 +0000 |
commit | 932540b64852d678add00f9c9e3225e1fc581aed (patch) | |
tree | c6ed79a7b936bd0665b1b0861c8b1441c7c1598a /gcc/tree-ssa-uncprop.c | |
parent | 5de14a6ad5ab23298731a596426192e62a1f40b9 (diff) | |
download | gcc-932540b64852d678add00f9c9e3225e1fc581aed.tar.gz |
* tree-ssa-uncprop.c (associate_equivalences_with_edges): Properly
handle SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
* g++.old-deja/g++.law/pr25000.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107710 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-uncprop.c')
-rw-r--r-- | gcc/tree-ssa-uncprop.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/tree-ssa-uncprop.c b/gcc/tree-ssa-uncprop.c index 4ca90c2bffa..28d385098fb 100644 --- a/gcc/tree-ssa-uncprop.c +++ b/gcc/tree-ssa-uncprop.c @@ -92,7 +92,8 @@ associate_equivalences_with_edges (void) /* If the conditional is a single variable 'X', record 'X = 1' for the true edge and 'X = 0' on the false edge. */ - if (TREE_CODE (cond) == SSA_NAME) + if (TREE_CODE (cond) == SSA_NAME + && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (cond)) { equivalency = xmalloc (sizeof (struct edge_equivalency)); equivalency->rhs = constant_boolean_node (1, TREE_TYPE (cond)); @@ -114,6 +115,7 @@ associate_equivalences_with_edges (void) know the value of OP0 on both arms of the branch. i.e., we can record an equivalence for OP0 rather than COND. */ if (TREE_CODE (op0) == SSA_NAME + && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op0) && TREE_CODE (TREE_TYPE (op0)) == BOOLEAN_TYPE && is_gimple_min_invariant (op1)) { @@ -152,8 +154,10 @@ associate_equivalences_with_edges (void) } if (TREE_CODE (op0) == SSA_NAME + && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op0) && (is_gimple_min_invariant (op1) - || TREE_CODE (op1) == SSA_NAME)) + || (TREE_CODE (op1) == SSA_NAME + && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op1)))) { /* For IEEE, -0.0 == 0.0, so we don't necessarily know the sign of a variable compared against zero. If @@ -185,7 +189,8 @@ associate_equivalences_with_edges (void) { tree cond = SWITCH_COND (stmt); - if (TREE_CODE (cond) == SSA_NAME) + if (TREE_CODE (cond) == SSA_NAME + && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (cond)) { tree labels = SWITCH_LABELS (stmt); int i, n_labels = TREE_VEC_LENGTH (labels); |