From patchwork Thu Nov 1 02:54:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Bergner X-Patchwork-Id: 196073 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 99F362C0098 for ; Thu, 1 Nov 2012 13:54:50 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1352343291; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Received:Subject:From:To:Cc: In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version: Content-Transfer-Encoding:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=FRdqWkBMpV6E07/R2/8dC5X7IZ0=; b=FeRRk5sH0XTnzVT DDEIUJhH6+IvYxW3gq+VdPN/EGZN/jCvuCJzggj4o609aJ/zO2eqn89MEXo9vEtQ rdjXUAG4MOY5w50aHrKldBmNv0LPQNnc+/bb7pZG9w3mzVA0BtZhk7y5/NPpzIGB twWN0bKYpq9URCh6/hfyjbVzovTQ= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Received:Received:Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:Content-Transfer-Encoding:X-Content-Scanned:x-cbid:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=xWY/BPawrwelNC+JQ5vSGmLxVkMI7MSECgFuSr/ZsIExoyMiZHPsPZTfm9M/0o Sq+Mxab+izTJZpZez5oGa/Sf0ipO4fHdGZq8+TNC3JJl7pZ2hgf+zKiFEjM5icx5 5i3wYECzpnUQuRG2Ld+QqLpXwZ03LM3YHyHQXIsjwv7Lw=; Received: (qmail 27869 invoked by alias); 1 Nov 2012 02:54:46 -0000 Received: (qmail 27859 invoked by uid 22791); 1 Nov 2012 02:54:46 -0000 X-SWARE-Spam-Status: No, hits=-5.5 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e38.co.us.ibm.com (HELO e38.co.us.ibm.com) (32.97.110.159) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Nov 2012 02:54:45 +0000 Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 31 Oct 2012 20:54:44 -0600 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 31 Oct 2012 20:54:43 -0600 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id E33AC1FF002A for ; Wed, 31 Oct 2012 20:54:10 -0600 (MDT) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qA12sB3A218668 for ; Wed, 31 Oct 2012 20:54:12 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qA12sBVc029771 for ; Wed, 31 Oct 2012 20:54:11 -0600 Received: from [192.168.1.113] (vorma.rchland.ibm.com [9.10.86.174]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id qA12sApF029718; Wed, 31 Oct 2012 20:54:10 -0600 Subject: Re: [PATCH, GCC 4.7] Backport fix for PR tree-optimization/53708 From: Peter Bergner To: Jakub Jelinek Cc: Richard Biener , "gcc-patches@gcc.gnu.org" , "libc-alpha@sourceware.org" In-Reply-To: <1351692147.4619.5.camel@otta> References: <1351616337.4778.7.camel@otta.rchland.ibm.com> <1351622613.4778.21.camel@otta.rchland.ibm.com> <20121030185535.GV1752@tucnak.redhat.com> <1351623824.4778.27.camel@otta.rchland.ibm.com> <20121030193731.GX1752@tucnak.redhat.com> <1351628621.4778.29.camel@otta.rchland.ibm.com> <1351691611.4619.3.camel@otta> <20121031135555.GJ1752@tucnak.redhat.com> <1351692147.4619.5.camel@otta> Date: Wed, 31 Oct 2012 21:54:09 -0500 Message-ID: <1351738449.4619.10.camel@otta> Mime-Version: 1.0 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12110102-5518-0000-0000-000008E415B9 X-IsSubscribed: yes 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 On Wed, 2012-10-31 at 09:02 -0500, Peter Bergner wrote: > On Wed, 2012-10-31 at 14:55 +0100, Jakub Jelinek wrote: > > On Wed, Oct 31, 2012 at 08:53:31AM -0500, Peter Bergner wrote: > > > Great. Jakub, were you going to commit your change or did you want me > > > to do that? > > > > I haven't tested it, you did, so please do that yourself. Thanks. > > I tested it on FSF 4.7. I'll do a quick trunk bootstrap/regtest and > commit it when it passes. Thanks. Ok, committed as revision 193058. I'll wait a few days before committing it to the FSF 4.7 branch. For completeness, the patch I committed is attached below. Peter 2012-10-31 Jakub Jelinek PR tree-optimization/53708 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Preserve user-supplied alignment when used with an explicit section name. Index: gcc/tree-vect-data-refs.c =================================================================== --- gcc/tree-vect-data-refs.c (revision 193057) +++ gcc/tree-vect-data-refs.c (revision 193058) @@ -4858,6 +4858,13 @@ if (DECL_PRESERVE_P (decl)) return false; + /* Do not override explicit alignment set by the user when an explicit + section name is also used. This is a common idiom used by many + software projects. */ + if (DECL_SECTION_NAME (decl) != NULL_TREE + && !DECL_HAS_IMPLICIT_SECTION_NAME_P (decl)) + return false; + if (TREE_STATIC (decl)) return (alignment <= MAX_OFILE_ALIGNMENT); else