This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix MEM_EXPR vs. MEM_ALIAS_SET inconsistency


This fixes $subject when dispatching to the tree oracle by simply
disabling TBAA when RTL says so.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

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.

Index: gcc/alias.c
===================================================================
--- gcc/alias.c	(revision 162864)
+++ gcc/alias.c	(working copy)
@@ -354,7 +354,10 @@ rtx_refs_may_alias_p (const_rtx x, const
       || !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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]