From 636f59cfb37b743bf162e42d79e10385f44e0f9b Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 31 Jan 2013 08:53:43 +0000 Subject: [PATCH] re PR tree-optimization/56150 (ICE segfault in do_pre / tail_merge_optimize) 2013-01-31 Richard Biener PR tree-optimization/56150 * tree-ssa-loop-manip.c (find_uses_to_rename_stmt): Do not visit virtual operands. (find_uses_to_rename_bb): Likewise. From-SVN: r195609 --- gcc/ChangeLog | 9 ++++++++- gcc/tree-ssa-loop-manip.c | 7 ++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ae641ef..b09bce0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,11 @@ -2013-01-30 Richard Biener +2013-01-31 Richard Biener + + PR tree-optimization/56150 + * tree-ssa-loop-manip.c (find_uses_to_rename_stmt): Do not + visit virtual operands. + (find_uses_to_rename_bb): Likewise. + +2013-01-31 Richard Biener PR tree-optimization/56150 * tree-ssa-tail-merge.c (gimple_equal_p): Properly handle diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c index 3601ece..4645588 100644 --- a/gcc/tree-ssa-loop-manip.c +++ b/gcc/tree-ssa-loop-manip.c @@ -402,7 +402,7 @@ find_uses_to_rename_stmt (gimple stmt, bitmap *use_blocks, bitmap need_phis) if (is_gimple_debug (stmt)) return; - FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_ALL_USES) + FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_USE) find_uses_to_rename_use (bb, var, use_blocks, need_phis); } @@ -422,8 +422,9 @@ find_uses_to_rename_bb (basic_block bb, bitmap *use_blocks, bitmap need_phis) for (bsi = gsi_start_phis (e->dest); !gsi_end_p (bsi); gsi_next (&bsi)) { gimple phi = gsi_stmt (bsi); - find_uses_to_rename_use (bb, PHI_ARG_DEF_FROM_EDGE (phi, e), - use_blocks, need_phis); + if (! virtual_operand_p (gimple_phi_result (phi))) + find_uses_to_rename_use (bb, PHI_ARG_DEF_FROM_EDGE (phi, e), + use_blocks, need_phis); } for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi)) -- 2.7.4