]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2016-05-12 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 12 May 2016 07:29:33 +0000 (07:29 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 12 May 2016 07:29:33 +0000 (07:29 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236159 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-data-ref.c

index da2a10c0356b33557afd1a5f39bf91707e5fd862..6b3ca4b47822d68ba28cba088e6196f78bfa6e02 100644 (file)
@@ -1,3 +1,10 @@
+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
index d6d9ffcaa3424992c7203712a9c16969bc50ad02..ed28ca1d6e5a665883ffbf8f8016299d42b6f44f 100644 (file)
@@ -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;