diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-21 09:52:00 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-21 09:52:00 +0000 |
commit | 436289eef039296979fe6e93b5ef0d22ef0514e1 (patch) | |
tree | e56f74dda4e97878bf4598aa4d45f83c158b7fba /gcc/tree-ssa-propagate.c | |
parent | 52f1f347813e02b39069b8bda043000ad3aa9c47 (diff) | |
download | gcc-436289eef039296979fe6e93b5ef0d22ef0514e1.tar.gz |
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: svn+ssh://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.c | 8 |
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. */ |