diff options
author | Richard Biener <rguenther@suse.de> | 2015-09-18 07:57:00 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-09-18 07:57:00 +0000 |
commit | a0f79fcc43760c8b7f72eccc9686c6e5cb7995d9 (patch) | |
tree | 5b63093bcc6c103adf789191e978d64af6c25cd8 /gcc/tree-ssa-alias.c | |
parent | 9ace6a87332fe24076e18706d8d2c7c9b56dcce9 (diff) | |
download | gcc-a0f79fcc43760c8b7f72eccc9686c6e5cb7995d9.zip gcc-a0f79fcc43760c8b7f72eccc9686c6e5cb7995d9.tar.gz gcc-a0f79fcc43760c8b7f72eccc9686c6e5cb7995d9.tar.bz2 |
re PR tree-optimization/66142 (Loop is not vectorized because not sufficient support for GOMP_SIMD_LANE)
2015-09-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/66142
* fold-const.c (operand_equal_p): When OEP_ADDRESS_OF
treat MEM[&x] and x the same.
* tree-ssa-sccvn.h (vn_reference_fold_indirect): Remove.
* tree-ssa-sccvn.c (vn_reference_fold_indirect): Return true
when we simplified sth.
(vn_reference_maybe_forwprop_address): Likewise.
(valueize_refs_1): When we simplified through
vn_reference_fold_indirect or vn_reference_maybe_forwprop_address
set valueized_anything to true.
(vn_reference_lookup_3): Use stmt_kills_ref_p to see whether
one ref kills the other instead of just a offset-based test.
* tree-ssa-alias.c (stmt_kills_ref_p): Use OEP_ADDRESS_OF
for the operand_equal_p test to compare bases and also compare
sizes.
From-SVN: r227896
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 0445052..bc4b525 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -2282,9 +2282,16 @@ stmt_kills_ref_p (gimple stmt, ao_ref *ref) if (saved_lhs0) TREE_OPERAND (lhs, 0) = saved_lhs0; } - /* Finally check if lhs is equal or equal to the base candidate - of the access. */ - if (operand_equal_p (lhs, base, 0)) + /* Finally check if the lhs has the same address and size as the + base candidate of the access. */ + if (lhs == base + || (((TYPE_SIZE (TREE_TYPE (lhs)) + == TYPE_SIZE (TREE_TYPE (base))) + || (TYPE_SIZE (TREE_TYPE (lhs)) + && TYPE_SIZE (TREE_TYPE (base)) + && operand_equal_p (TYPE_SIZE (TREE_TYPE (lhs)), + TYPE_SIZE (TREE_TYPE (base)), 0))) + && operand_equal_p (lhs, base, OEP_ADDRESS_OF))) return true; } |