From patchwork Mon Sep 20 20:24:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 65250 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 0CF71B70AE for ; Tue, 21 Sep 2010 06:23:53 +1000 (EST) Received: (qmail 18884 invoked by alias); 20 Sep 2010 20:23:44 -0000 Received: (qmail 18872 invoked by uid 22791); 20 Sep 2010 20:23:40 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Sep 2010 20:23:36 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8KKNYLx002878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 Sep 2010 16:23:34 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8KKNXEY026164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Sep 2010 16:23:34 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id o8KKOegl002111; Mon, 20 Sep 2010 22:24:40 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id o8KKOeee002110; Mon, 20 Sep 2010 22:24:40 +0200 Date: Mon, 20 Sep 2010 22:24:39 +0200 From: Jakub Jelinek To: Richard Henderson , "H.J. Lu" Cc: gcc-patches@gcc.gnu.org Subject: Re: PATCH: PR middle-end/45678: [4.4/4.5/4.6 Regression] crash on vector code with -m32 -msse Message-ID: <20100920202439.GP1269@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <20100917165833.GA17163@intel.com> <4C93A958.6000502@redhat.com> <20100917181519.GE1269@tyan-ft48-01.lab.bos.redhat.com> <20100917214028.GF1269@tyan-ft48-01.lab.bos.redhat.com> <20100920170418.GO1269@tyan-ft48-01.lab.bos.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) 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 Mon, Sep 20, 2010 at 10:12:58AM -0700, H.J. Lu wrote: > You should remove > > update_stack_alignment (align); > > a few line down since it will never increase stack alignment. Here is an updated patch, bootstrapped/regtested again on x86_64-linux and i686-linux. Ok? 2010-09-20 Jakub Jelinek PR middle-end/45678 * cfgexpand.c (expand_one_stack_var_at): Use crtl->max_used_stack_slot_alignment as max_align, instead of maximum of that and PREFERRED_STACK_BOUNDARY. Don't call update_stack_alignment. Jakub --- gcc/cfgexpand.c.jj 2010-09-20 18:44:57.928431137 +0200 +++ gcc/cfgexpand.c 2010-09-20 20:03:32.706364386 +0200 @@ -738,12 +738,10 @@ expand_one_stack_var_at (tree decl, HOST offset -= frame_phase; align = offset & -offset; align *= BITS_PER_UNIT; - max_align = MAX (crtl->max_used_stack_slot_alignment, - PREFERRED_STACK_BOUNDARY); + max_align = crtl->max_used_stack_slot_alignment; if (align == 0 || align > max_align) align = max_align; - update_stack_alignment (align); DECL_ALIGN (decl) = align; DECL_USER_ALIGN (decl) = 0; }