diff options
author | Richard Biener <rguenther@suse.de> | 2014-11-24 14:07:18 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-11-24 14:07:18 +0000 |
commit | 8403c2cf5f66758fc78a01a675b0d218fded0202 (patch) | |
tree | 67f5be1ec46132969be310c870c5591ebbadbab2 /gcc/gimple-fold.c | |
parent | 34a4625c52673828ff9b1eac7f68b5d23b58c5f5 (diff) | |
download | gcc-8403c2cf5f66758fc78a01a675b0d218fded0202.zip gcc-8403c2cf5f66758fc78a01a675b0d218fded0202.tar.gz gcc-8403c2cf5f66758fc78a01a675b0d218fded0202.tar.bz2 |
re PR target/63679 ([AArch64] Failure to constant fold.)
2014-11-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/63679
* tree-ssa-sccvn.c: Include ipa-ref.h, plugin-api.h and cgraph.h.
(copy_reference_ops_from_ref): Fix non-constant ADDR_EXPR case
to properly leave off at -1.
(fully_constant_vn_reference_p): Generalize folding from
constant initializers.
(vn_reference_lookup_3): When looking through aggregate copies
handle offsetted reads and try simplifying the result to
a constant.
* gimple-fold.h (fold_ctor_reference): Export.
* gimple-fold.c (fold_ctor_reference): Likewise.
* gcc.dg/tree-ssa/ssa-fre-42.c: New testcase.
* gcc.dg/tree-ssa/20030807-5.c: Avoid folding read from global to zero.
* gcc.target/i386/ssetype-1.c: Likewise.
* gcc.target/i386/ssetype-3.c: Likewise.
* gcc.target/i386/ssetype-5.c: Likewise.
From-SVN: r218019
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r-- | gcc/gimple-fold.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index 91b9b0c..98ec117 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -4788,10 +4788,6 @@ gimple_fold_stmt_to_constant (gimple stmt, tree (*valueize) (tree)) /* The following set of functions are supposed to fold references using their constant initializers. */ -static tree fold_ctor_reference (tree type, tree ctor, - unsigned HOST_WIDE_INT offset, - unsigned HOST_WIDE_INT size, tree); - /* See if we can find constructor defining value of BASE. When we know the consructor with constant offset (such as base is array[40] and we do know constructor of array), then @@ -5027,7 +5023,7 @@ fold_nonarray_ctor_reference (tree type, tree ctor, /* CTOR is value initializing memory, fold reference of type TYPE and size SIZE to the memory at bit OFFSET. */ -static tree +tree fold_ctor_reference (tree type, tree ctor, unsigned HOST_WIDE_INT offset, unsigned HOST_WIDE_INT size, tree from_decl) { |