]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR tree-optimization/31146 (forwprop does not look through casts)
authorRichard Guenther <rguenther@suse.de>
Fri, 16 Mar 2007 10:11:14 +0000 (10:11 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 16 Mar 2007 10:11:14 +0000 (10:11 +0000)
commit7b1737d07a6b869120d7fca9bd755c9e426a0bfe
tree6c8e4f3d768e11469247eb484982dd5b0f51b792
parent3811dfcdcdfedc8461aacb29b64c4fd6c0ef10ad
re PR tree-optimization/31146 (forwprop does not look through casts)

2007-03-16  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/31146
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Restructure
to allow recursion of forward_propagate_addr_expr.
(forward_propagate_addr_into_variable_array_index): Likewise.
(forward_propagate_addr_expr): Likewise.
(tree_ssa_forward_propagate_single_use_vars): Likewise.
(forward_propagate_addr_expr_1): Recurse on simple copies
instead of propagating into them.  Do so for useless conversions
as well.
(forward_propagate_addr_expr): Clean up unused statements after
recursion.

* g++.dg/tree-ssa/pr31146.C: New testcase.

From-SVN: r122985
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/pr31146.C [new file with mode: 0644]
gcc/tree-ssa-forwprop.c