revert: re PR tree-optimization/80492 (Wrong code when unrolling a loop with inline...
authorRichard Biener <rguenther@suse.de>
Wed, 3 May 2017 10:59:25 +0000 (10:59 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 3 May 2017 10:59:25 +0000 (10:59 +0000)
2017-05-03  Richard Biener  <rguenther@suse.de>

Revert
PR tree-optimization/80492
* tree-ssa-alias.c (decl_refs_may_alias_p): Handle
compare_base_decls returning dont-know properly.

From-SVN: r247543

gcc/ChangeLog
gcc/tree-ssa-alias.c

index c884760ad98ea1db4bba086793456497cdc94a26..8dee382d10a5a5de2deba26ca41692ce1d57be0c 100644 (file)
@@ -1,3 +1,10 @@
+2017-05-03  Richard Biener  <rguenther@suse.de>
+
+       Revert
+       PR tree-optimization/80492
+       * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
+       compare_base_decls returning dont-know properly.
+
 2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
        * config/arm/iterators.md (CCSI): New mode iterator.
index 8cab159916a776e3a9f50de68d72313596278338..dc54533e48bd3bc96e6f5225dc1e0347e46351b5 100644 (file)
@@ -1096,16 +1096,13 @@ decl_refs_may_alias_p (tree ref1, tree base1,
 {
   gcc_checking_assert (DECL_P (base1) && DECL_P (base2));
 
-  int cmp = compare_base_decls (base1, base2);
-
   /* If both references are based on different variables, they cannot alias.  */
-  if (cmp == 0)
+  if (compare_base_decls (base1, base2) == 0)
     return false;
 
   /* If both references are based on the same variable, they cannot alias if
      the accesses do not overlap.  */
-  if (cmp == 1
-      && !ranges_overlap_p (offset1, max_size1, offset2, max_size2))
+  if (!ranges_overlap_p (offset1, max_size1, offset2, max_size2))
     return false;
 
   /* For components with variable position, the above test isn't sufficient,