diff options
author | Richard Guenther <rguenther@suse.de> | 2012-04-20 11:56:33 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-04-20 11:56:33 +0000 |
commit | faaf273bb0591fe719fcdd18b6c0941f98aa342b (patch) | |
tree | a2a8d5dd0382fc2ff6797df59b983cf18127cd13 /gcc/tree-ssa-copy.c | |
parent | a51e5fa2c28e88b936ca246a74bf2cba30c5a40d (diff) | |
download | gcc-faaf273bb0591fe719fcdd18b6c0941f98aa342b.zip gcc-faaf273bb0591fe719fcdd18b6c0941f98aa342b.tar.gz gcc-faaf273bb0591fe719fcdd18b6c0941f98aa342b.tar.bz2 |
tree-ssa-copy.c (propagate_tree_value_into_stmt): Use update_call_from_tree when propagating into a call.
2012-04-20 Richard Guenther <rguenther@suse.de>
* tree-ssa-copy.c (propagate_tree_value_into_stmt): Use
update_call_from_tree when propagating into a call.
* g++.dg/torture/20120420-1.C: New testcase.
From-SVN: r186622
Diffstat (limited to 'gcc/tree-ssa-copy.c')
-rw-r--r-- | gcc/tree-ssa-copy.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index 4c6d992..45b5c92 100644 --- a/gcc/tree-ssa-copy.c +++ b/gcc/tree-ssa-copy.c @@ -257,13 +257,11 @@ propagate_tree_value_into_stmt (gimple_stmt_iterator *gsi, tree val) else if (is_gimple_call (stmt) && gimple_call_lhs (stmt) != NULL_TREE) { - gimple new_stmt; - tree expr = NULL_TREE; + bool res; propagate_tree_value (&expr, val); - new_stmt = gimple_build_assign (gimple_call_lhs (stmt), expr); - move_ssa_defining_stmt_for_defs (new_stmt, stmt); - gsi_replace (gsi, new_stmt, false); + res = update_call_from_tree (gsi, expr); + gcc_assert (res); } else if (gimple_code (stmt) == GIMPLE_SWITCH) propagate_tree_value (gimple_switch_index_ptr (stmt), val); |