i386: Also adjust stack frame for stack slot alignment
We should also adjust stack_realign_offset for the largest alignment of
stack slot actually used when stack realignment isn't needed. This is
required to keep stack frame properly aligned to satisfy the largest
alignment of stack slots.
Tested on Linux/i686 and Linux/x86-64.
gcc/
PR target/83735
* config/i386/i386.c (ix86_compute_frame_layout): Always adjust
stack_realign_offset for the largest alignment of stack slot
actually used.
(ix86_find_max_used_stack_alignment): New function.
(ix86_finalize_stack_frame_flags): Use it. Set
max_used_stack_alignment if we don't realign stack.
* config/i386/i386.h (machine_function): Add
max_used_stack_alignment.
gcc/testsuite/
PR target/83735
* gcc.target/i386/pr83735.c: New test.
From-SVN: r256436