From patchwork Wed Aug 4 15:32:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 60865 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id D5DE1B70A6 for ; Thu, 5 Aug 2010 01:32:56 +1000 (EST) Received: (qmail 1190 invoked by alias); 4 Aug 2010 15:32:53 -0000 Received: (qmail 1178 invoked by uid 22791); 4 Aug 2010 15:32:52 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Aug 2010 15:32:47 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 6A0E68D893 for ; Wed, 4 Aug 2010 17:32:45 +0200 (CEST) Date: Wed, 4 Aug 2010 17:32:45 +0200 (CEST) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix MEM_EXPR vs. MEM_ALIAS_SET inconsistency Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 * 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