This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix MEM_EXPR vs. MEM_ALIAS_SET inconsistency
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 4 Aug 2010 17:32:45 +0200 (CEST)
- Subject: [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