diff mbox

Fix MEM_EXPR vs. MEM_ALIAS_SET inconsistency

Message ID alpine.LNX.2.00.1008041731480.25856@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Aug. 4, 2010, 3:32 p.m. UTC
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.
diff mbox

Patch

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