aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-05-28 10:54:33 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-05-28 10:54:33 +0000
commitbd388c2a87709ba917054a7450a4d39d2d97635d (patch)
tree34763bca901a18ba611246d8dcc7815e94f98701 /gcc/tree-ssa-dom.c
parent95f803bd9be56121561ca21da8063dcf8a368d74 (diff)
downloadgcc-bd388c2a87709ba917054a7450a4d39d2d97635d.zip
gcc-bd388c2a87709ba917054a7450a4d39d2d97635d.tar.gz
gcc-bd388c2a87709ba917054a7450a4d39d2d97635d.tar.bz2
re PR tree-optimization/57411 (ICE: verify_ssa failed: definition in block 4 does not dominate use in block 11 with -fno-tree-dce -ftree-vectorize)
2013-05-28 Richard Biener <rguenther@suse.de> PR tree-optimization/57411 * tree-ssa-copy.c (may_propagate_copy): Cannot propagate virtual operands. * tree-ssa-dom.c (eliminate_const_or_copy): Special-case virtual operand propagation. * g++.dg/opt/pr57411.C: New testcase. From-SVN: r199374
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 602289d..83ca27a 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -2936,7 +2936,22 @@ eliminate_const_or_copy (gimple stmt, bitmap interesting_names)
return;
}
- propagate_rhs_into_lhs (stmt, lhs, rhs, interesting_names);
+ if (!virtual_operand_p (lhs))
+ propagate_rhs_into_lhs (stmt, lhs, rhs, interesting_names);
+ else
+ {
+ gimple use_stmt;
+ imm_use_iterator iter;
+ use_operand_p use_p;
+ /* For virtual operands we have to propagate into all uses as
+ otherwise we will create overlapping life-ranges. */
+ FOR_EACH_IMM_USE_STMT (use_stmt, iter, lhs)
+ FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
+ SET_USE (use_p, rhs);
+ if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs))
+ SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs) = 1;
+ remove_stmt_or_phi (stmt);
+ }
/* Note that STMT may well have been deleted by now, so do
not access it, instead use the saved version # to clear