tree-ssa-sccvn.c (visit_reference_op_load): If the lookup found an expression with...
authorRichard Guenther <rguenther@suse.de>
Tue, 18 Mar 2008 16:10:24 +0000 (16:10 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 18 Mar 2008 16:10:24 +0000 (16:10 +0000)
commitb80280f2c568097c1da9aacd9b540f74ad91cf22
tree1e20a972378312ce4158563ae53589c5b3dda789
parent2e28e797125a94c7587b599eba438015fa02e5fe
tree-ssa-sccvn.c (visit_reference_op_load): If the lookup found an expression with constants, note that in the VN for the lhs.

2008-03-18  Richard Guenther  <rguenther@suse.de>

* tree-ssa-sccvn.c (visit_reference_op_load): If the lookup
found an expression with constants, note that in the VN for the lhs.
* tree-ssa-pre.c (eliminate): Visit COND_EXPR statements and
fold them to constants if possible.  Run cleanup_cfg if done so.
(execute_pre): Return todo.
(do_pre): Likewise.
(execute_fre): Likewise.
* tree-ssa-forwprop.c (can_propagate_from): Allow propagation
of constants.
(get_prop_source_stmt): Look through pointer conversions.

* gcc.dg/tree-ssa/forwprop-4.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-16.c: Likewise.

From-SVN: r133315
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/forwprop-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-16.c [new file with mode: 0644]
gcc/tree-ssa-forwprop.c
gcc/tree-ssa-pre.c
gcc/tree-ssa-sccvn.c