aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-propagate.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-09-21 09:52:00 +0000
committerRichard Guenther <rguenther@suse.de>2010-09-21 09:52:00 +0000
commit1780a6405c70112c25965b73805e3cc44849b462 (patch)
treee56f74dda4e97878bf4598aa4d45f83c158b7fba /gcc/tree-ssa-propagate.c
parent130e2bb954b34746ae9f4f6eff57bd15446ecce6 (diff)
2010-09-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45580 * tree-ssa-propagate.c (substitute_and_fold): Always replace regular uses. * gimple-fold.c (gimple_fold_obj_type_ref): For a BINFO without virtuals fold the call into a regular indirect one. * g++.dg/torture/pr45580.C: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@164474 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r--gcc/tree-ssa-propagate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index e08d2e7ae0c..c97960cfdf7 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -1122,12 +1122,12 @@ substitute_and_fold (ssa_prop_get_value_fn get_value_fn,
{
did_replace = true;
prop_stats.num_stmts_folded++;
+ stmt = gsi_stmt (oldi);
+ update_stmt (stmt);
}
- /* Only replace real uses if we couldn't fold the
- statement using value range information. */
- if (get_value_fn
- && !did_replace)
+ /* Replace real uses in the statement. */
+ if (get_value_fn)
did_replace |= replace_uses_in (stmt, get_value_fn);
/* If we made a replacement, fold the statement. */