re PR tree-optimization/31146 (forwprop does not look through casts)
commitf6c5fefc1dee760599da3d7b1bc513fd59f6c6e8
authorRichard Guenther <rguenther@suse.de>
Wed, 2 May 2007 09:12:49 +0000 (2 09:12 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 2 May 2007 09:12:49 +0000 (2 09:12 +0000)
tree0cd1c91e1be36ab612ad8a524b6f6fdb8d5392e2
parentd7598e110d060f8b7fb6598736f68700b20c400f
re PR tree-optimization/31146 (forwprop does not look through casts)

2007-05-02  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/31146
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): New
argument, single_use_p.  If we have a single use that is
a conversion to the definition rhs type, propagate that rhs.
(forward_propagate_addr_expr): Pass single_use_p argument
to forward_propagate_addr_expr_1.

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

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