http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59501
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Mon Dec 30 08:53:10 2013 New Revision: 206243 URL: http://gcc.gnu.org/viewcvs?rev=206243&root=gcc&view=rev Log: PR target/59501 * config/i386/i386.c (ix86_save_reg): Don't return true for drap_reg if !crtl->stack_realign_needed. (ix86_finalize_stack_realign_flags): If drap_reg isn't live on entry and stack_realign_needed will be false, clear drap_reg and need_drap. Optimize leaf functions that don't need stack frame even if crtl->need_drap. * gcc.target/i386/pr59501-1.c: New test. * gcc.target/i386/pr59501-1a.c: New test. * gcc.target/i386/pr59501-2.c: New test. * gcc.target/i386/pr59501-2a.c: New test. * gcc.target/i386/pr59501-3.c: New test. * gcc.target/i386/pr59501-3a.c: New test. * gcc.target/i386/pr59501-4.c: New test. * gcc.target/i386/pr59501-4a.c: New test. * gcc.target/i386/pr59501-5.c: New test. * gcc.target/i386/pr59501-6.c: New test. Added: trunk/gcc/testsuite/gcc.target/i386/pr59501-1.c trunk/gcc/testsuite/gcc.target/i386/pr59501-1a.c trunk/gcc/testsuite/gcc.target/i386/pr59501-2.c trunk/gcc/testsuite/gcc.target/i386/pr59501-2a.c trunk/gcc/testsuite/gcc.target/i386/pr59501-3.c trunk/gcc/testsuite/gcc.target/i386/pr59501-3a.c trunk/gcc/testsuite/gcc.target/i386/pr59501-4.c trunk/gcc/testsuite/gcc.target/i386/pr59501-4a.c trunk/gcc/testsuite/gcc.target/i386/pr59501-5.c trunk/gcc/testsuite/gcc.target/i386/pr59501-6.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c trunk/gcc/testsuite/ChangeLog