From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13648 invoked by alias); 12 Feb 2009 01:45:28 -0000 Received: (qmail 13613 invoked by uid 48); 12 Feb 2009 01:45:13 -0000 Date: Thu, 12 Feb 2009 01:45:00 -0000 Message-ID: <20090212014513.13612.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/39146] Unnecessary stack alignment In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "Joey dot ye at intel dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg01027.txt.bz2 ------- Comment #5 from Joey dot ye at intel dot com 2009-02-12 01:45 ------- Stack realign is finalized by stack_realign = (incoming_stack_boundary < (current_function_is_leaf ? crtl->max_used_stack_slot_alignment : crtl->stack_alignment_needed)); since bar is leaf function, it checks max_used_stack_slot_alignment. According to it's definition, max_used_stack_slot_alignment is /* The largest alignment of slot allocated on the stack. */. Parameter x isn't allocated on local stack, so max_used_stack_slot_alignment shouldn't be set to 256 bits. In locate_and_pad_parm, if (crtl->max_used_stack_slot_alignment < crtl->stack_alignment_needed) crtl->max_used_stack_slot_alignment = crtl->stack_alignment_needed; sets max_used_stack_slot_alignment to 256 bits, which seems shouldn't happen all the time. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39146