diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-03 15:26:29 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-03 15:26:29 +0000 |
commit | e835500f7beb3d4a8f59101416ab88bf6059235c (patch) | |
tree | 8d0cb048bbf0e64849c2cdd95b38cf3e6d525b61 /gcc/tree-ssa-dse.c | |
parent | 21a139ac13882ea122f7046f7079ca81a1192757 (diff) | |
download | gcc-e835500f7beb3d4a8f59101416ab88bf6059235c.tar.gz |
2005-02-03 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/19768
* g++.dg/opt/pr19768.C: New test.
2005-02-03 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/19768
* tree-ssa-dse.c (fix_phi_uses): Update the occurs in abnormal
phi flag if the phi is abnormal.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94660 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-dse.c')
-rw-r--r-- | gcc/tree-ssa-dse.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c index 5d29e03a70d..625e1d1fa8f 100644 --- a/gcc/tree-ssa-dse.c +++ b/gcc/tree-ssa-dse.c @@ -134,7 +134,13 @@ fix_phi_uses (tree phi, tree stmt) def_operand_p def_p; ssa_op_iter iter; int i; - + edge e; + edge_iterator ei; + + FOR_EACH_EDGE (e, ei, PHI_BB (phi)->preds) + if (e->flags & EDGE_ABNORMAL) + break; + get_stmt_operands (stmt); FOR_EACH_SSA_MAYDEF_OPERAND (def_p, use_p, stmt, iter) @@ -146,7 +152,12 @@ fix_phi_uses (tree phi, tree stmt) them with the appropriate V_MAY_DEF_OP. */ for (i = 0; i < PHI_NUM_ARGS (phi); i++) if (v_may_def == PHI_ARG_DEF (phi, i)) - SET_PHI_ARG_DEF (phi, i, v_may_use); + { + SET_PHI_ARG_DEF (phi, i, v_may_use); + /* Update if the new phi argument is an abnormal phi. */ + if (e != NULL) + SSA_NAME_OCCURS_IN_ABNORMAL_PHI (v_may_use) = 1; + } } } |