diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-11 19:44:57 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-11 19:44:57 +0000 |
commit | 6a0e70b9889b597de5973a8afc5c7231bd328018 (patch) | |
tree | a9fcef8a8a45e353d52dccac8670eeec074c2021 /gcc/tree-ssa-forwprop.c | |
parent | 85b938d0b42513fa3a4dcd39541674d161b651f9 (diff) | |
download | gcc-6a0e70b9889b597de5973a8afc5c7231bd328018.tar.gz |
2006-01-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/25734
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Do not
stop propagation after successful propagation to the LHS.
* gcc.dg/tree-ssa/pr25734.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109598 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 2f857dc1076..892edde7a36 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -686,7 +686,6 @@ forward_propagate_addr_expr_1 (tree stmt, tree use_stmt) TREE_OPERAND (lhs, 0) = unshare_expr (TREE_OPERAND (stmt, 1)); fold_stmt_inplace (use_stmt); tidy_after_forward_propagate_addr (use_stmt); - return true; } /* Trivial case. The use statement could be a trivial copy. We @@ -696,7 +695,7 @@ forward_propagate_addr_expr_1 (tree stmt, tree use_stmt) we can catch some cascading effects, ie the single use is in a copy, and the copy is used later by a single INDIRECT_REF for example. */ - if (TREE_CODE (lhs) == SSA_NAME && TREE_OPERAND (use_stmt, 1) == name) + else if (TREE_CODE (lhs) == SSA_NAME && TREE_OPERAND (use_stmt, 1) == name) { TREE_OPERAND (use_stmt, 1) = unshare_expr (TREE_OPERAND (stmt, 1)); tidy_after_forward_propagate_addr (use_stmt); |