[Bug middle-end/47581] [4.6 regression] Unnecessary adjustments to stack pointer

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Feb 2 14:18:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47581

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> 2011-02-02 14:18:22 UTC ---
(In reply to comment #6)
> Created attachment 23213 [details]
> gcc46-pr47581.patch
> 
> This patch indeed fixes the testcase and passed bootstrap/regtest on
> x86_64-linux and i686-linux.

Update both stack_alignment_needed and stack_alignment_estimated
in expand_one_var may lead missed optimization like this. We
should delay stack_alignment_needed as much as we can. Setting
stack_alignment_estimated should be good enough before
stack_realign_finalized is set.

We should find out why expand_one_var needs to set
stack_alignment_needed.  I think this is a real bug.



More information about the Gcc-bugs mailing list