re PR middle-end/47581 (Unnecessary adjustments to stack pointer)
PR middle-end/47581 * config/i386/i386.c (ix86_compute_frame_size): Don't align offset if frame size is 0 in a leaf function. * gcc.target/i386/pr47581.c: New test. From-SVN: r170170
This commit is contained in:
parent
c1e2901ed0
commit
c95f9494fe
@ -1,3 +1,9 @@
|
||||
2011-02-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/47581
|
||||
* config/i386/i386.c (ix86_compute_frame_size): Don't align offset
|
||||
if frame size is 0 in a leaf function.
|
||||
|
||||
2011-02-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
PR pch/14940
|
||||
|
@ -9307,7 +9307,13 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
|
||||
offset += frame->va_arg_size;
|
||||
|
||||
/* Align start of frame for local function. */
|
||||
offset = (offset + stack_alignment_needed - 1) & -stack_alignment_needed;
|
||||
if (stack_realign_fp
|
||||
|| offset != frame->sse_reg_save_offset
|
||||
|| size != 0
|
||||
|| !current_function_is_leaf
|
||||
|| cfun->calls_alloca
|
||||
|| ix86_current_function_calls_tls_descriptor)
|
||||
offset = (offset + stack_alignment_needed - 1) & -stack_alignment_needed;
|
||||
|
||||
/* Frame pointer points here. */
|
||||
frame->frame_pointer_offset = offset;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2011-02-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/47581
|
||||
* gcc.target/i386/pr47581.c: New test.
|
||||
|
||||
2011-02-14 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/47730
|
||||
|
10
gcc/testsuite/gcc.target/i386/pr47581.c
Normal file
10
gcc/testsuite/gcc.target/i386/pr47581.c
Normal file
@ -0,0 +1,10 @@
|
||||
/* PR middle-end/47581 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fomit-frame-pointer -mpreferred-stack-boundary=4 -mincoming-stack-boundary=4" } */
|
||||
/* { dg-final { scan-assembler-not "(sub|add)l\[\\t \]*\\$\[0-9\]*,\[\\t \]*%\[re\]?sp" } } */
|
||||
|
||||
unsigned
|
||||
foo (unsigned a, unsigned b)
|
||||
{
|
||||
return ((unsigned long long) a * (unsigned long long) b) >> 32;
|
||||
}
|
Loading…
Reference in New Issue
Block a user