]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
alias.c (rtx_refs_may_alias_p): Do not resort to TBAA if either alias-set is zero.
authorRichard Guenther <rguenther@suse.de>
Wed, 4 Aug 2010 15:35:21 +0000 (15:35 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 4 Aug 2010 15:35:21 +0000 (15:35 +0000)
2010-08-04  Richard Guenther  <rguenther@suse.de>

* alias.c (rtx_refs_may_alias_p): Do not resort to TBAA
if either alias-set is zero.

From-SVN: r162867

gcc/ChangeLog
gcc/alias.c

index 77424eba5f83cf77fbaa845e7a89efc991723d96..23f0d8861de0f5477a43d4cc1253b4a8bfd72943 100644 (file)
@@ -1,3 +1,8 @@
+2010-08-04  Richard Guenther  <rguenther@suse.de>
+
+       * alias.c (rtx_refs_may_alias_p): Do not resort to TBAA
+       if either alias-set is zero.
+
 2010-08-04  Richard Guenther  <rguenther@suse.de>
 
        * tree-ssa-propagate.h (struct prop_value_d, prop_value_t): Move ...
index 9b70bb86bb26cfe4a4ddb0c3595b6c77e747eccc..f5de4db9d753f19d72aa85b1cbb3fa4f84846243 100644 (file)
@@ -354,7 +354,10 @@ rtx_refs_may_alias_p (const_rtx x, const_rtx mem, bool tbaa_p)
       || !ao_ref_from_mem (&ref2, mem))
     return true;
 
-  return refs_may_alias_p_1 (&ref1, &ref2, tbaa_p);
+  return refs_may_alias_p_1 (&ref1, &ref2,
+                            tbaa_p
+                            && MEM_ALIAS_SET (x) != 0
+                            && MEM_ALIAS_SET (mem) != 0);
 }
 
 /* Returns a pointer to the alias set entry for ALIAS_SET, if there is