]> git.ipfire.org Git - thirdparty/gcc.git/commit
x86: Don't use get_frame_size when finalizing stack frame
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Dec 2018 12:38:04 +0000 (12:38 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Dec 2018 12:38:04 +0000 (12:38 +0000)
commit76c21b271247ccbd681bdb4530426d2fe35dbfa5
tree9cc66ec9c0f5de6f878eed0d32c22b2a5329a741
parent95f61091a1264856c1128b67791843a791cb415f
x86: Don't use get_frame_size when finalizing stack frame

get_frame_size () returns used stack slots during compilation, which
may be optimized out later.  Since ix86_find_max_used_stack_alignment
is called by ix86_finalize_stack_frame_flags to check if stack frame
is required, there is no need to call get_frame_size () which may give
inaccurate final stack frame size.

Tested on AVX512 machine configured with

--with-arch=native --with-cpu=native

gcc/

PR target/88483
* config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
use get_frame_size ().

gcc/testsuite/

PR target/88483
* gcc.target/i386/stackalign/pr88483.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267133 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/stackalign/pr88483.c [new file with mode: 0644]