gimple-fold.c (maybe_fold_reference): Open-code relevant constant folding.
authorRichard Guenther <rguenther@suse.de>
Wed, 16 Mar 2011 11:36:30 +0000 (11:36 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 16 Mar 2011 11:36:30 +0000 (11:36 +0000)
commitf0eddb90199eac4df644329c8cd0089b110062f1
tree8f1870e0ed7b128c09f885498dd35f51103bff22
parent29f10e717837d30e181b25f9a691c7457be120a5
gimple-fold.c (maybe_fold_reference): Open-code relevant constant folding.

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

* gimple-fold.c (maybe_fold_reference): Open-code relevant
constant folding.  Move MEM_REF canonicalization first.
Rely on fold_const_aggregate_ref for initializer folding.
* tree-ssa-ccp.c (ccp_fold): Handle constant vector extracts.

* gcc.dg/tree-ssa/pr14814.c: Adjust.
* gcc.dg/tree-ssa/ssa-ccp-19.c: Likewise.

From-SVN: r171043
gcc/ChangeLog
gcc/gimple-fold.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr14814.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-19.c
gcc/tree-ssa-ccp.c