diff options
author | Richard Biener <rguenther@suse.de> | 2016-05-12 07:29:33 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-05-12 07:29:33 +0000 |
commit | eb09cdcb1a8b55b9c9257119053b0f6f7b24edd9 (patch) | |
tree | 45f9223ca19c8812d5cc3052d377a313fd5d5b18 /gcc | |
parent | 44ab146a7230d473f0b138abe428e923376d7b53 (diff) | |
download | gcc-eb09cdcb1a8b55b9c9257119053b0f6f7b24edd9.zip gcc-eb09cdcb1a8b55b9c9257119053b0f6f7b24edd9.tar.gz gcc-eb09cdcb1a8b55b9c9257119053b0f6f7b24edd9.tar.bz2 |
re PR tree-optimization/71060 (Compiler reports "loop vectorized" but actually it was not)
2016-05-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/71060
* tree-data-ref.c (initialize_data_dependence_relation): Do not
require exact match of DR_BASE_OBJECT but only matching address and
type.
From-SVN: r236159
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/tree-data-ref.c | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index da2a10c..6b3ca4b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2016-05-12 Richard Biener <rguenther@suse.de> + PR tree-optimization/71060 + * tree-data-ref.c (initialize_data_dependence_relation): Do not + require exact match of DR_BASE_OBJECT but only matching address and + type. + +2016-05-12 Richard Biener <rguenther@suse.de> + PR tree-optimization/70986 * cfganal.c: Include cfgloop.h. (dfs_find_deadend): Prefer to take edges exiting loops. diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index d6d9ffc..ed28ca1 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -1538,8 +1538,13 @@ initialize_data_dependence_relation (struct data_reference *a, } /* If the references do not access the same object, we do not know - whether they alias or not. */ - if (!operand_equal_p (DR_BASE_OBJECT (a), DR_BASE_OBJECT (b), 0)) + whether they alias or not. We do not care about TBAA or alignment + info so we can use OEP_ADDRESS_OF to avoid false negatives. + But the accesses have to use compatible types as otherwise the + built indices would not match. */ + if (!operand_equal_p (DR_BASE_OBJECT (a), DR_BASE_OBJECT (b), OEP_ADDRESS_OF) + || !types_compatible_p (TREE_TYPE (DR_BASE_OBJECT (a)), + TREE_TYPE (DR_BASE_OBJECT (b)))) { DDR_ARE_DEPENDENT (res) = chrec_dont_know; return res; |