https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80969
--- Comment #5 from dansan at gcc dot gnu.org --- Author: dansan Date: Wed Aug 23 21:46:14 2017 New Revision: 251321 URL: https://gcc.gnu.org/viewcvs?rev=251321&root=gcc&view=rev Log: PR target/80969 - Fix ICE with -mabi=ms -mavx512f, reduce wasted space when realigning stack. 2017-08-23 Daniel Santos <daniel.san...@pobox.com> * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset): Remove field. (ix86_frame::stack_realign_allocate): New field. (struct machine_frame_state): Modify comments. (machine_frame_state::sp_realigned_fp_end): New field. * config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame layout calculation. (sp_valid_at): Add assertion to assure no attempt to access invalid offset of a realigned stack. (fp_valid_at): Likewise. (choose_baseaddr): Modify comments. (ix86_emit_outlined_ms2sysv_save): Adjust to changes in ix86_expand_prologue. (ix86_expand_prologue): Modify stack realignment and allocation. (ix86_expand_epilogue): Modify comments. * doc/sourcebuild.texi: Add documentation for target selectors avx2, avx2_runtime, avx512f, and avx512f_runtime. 2017-08-23 Daniel Santos <daniel.san...@pobox.com> * gcc.target/i386/pr80969-1.c: New testcase. * gcc.target/i386/pr80969-2a.c: Likewise. * gcc.target/i386/pr80969-2.c: Likewise. * gcc.target/i386/pr80969-3.c: Likewise. * gcc.target/i386/pr80969-4a.c: Likewise. * gcc.target/i386/pr80969-4b.c: Likewise. * gcc.target/i386/pr80969-4.c: Likewise. * gcc.target/i386/pr80969-4.h: New header common to pr80969-4*.c * lib/target-supports.exp (check_avx512_os_support_available, check_avx512f_hw_available, check_effective_target_avx512f_runtime): New proceedures for target avx512f and avx512f_runtime selectors. (check_avx2_hw_available): Fix breakage due NULL being undefined. Added: trunk/gcc/testsuite/gcc.target/i386/pr80969-1.c trunk/gcc/testsuite/gcc.target/i386/pr80969-2.c trunk/gcc/testsuite/gcc.target/i386/pr80969-2a.c trunk/gcc/testsuite/gcc.target/i386/pr80969-3.c trunk/gcc/testsuite/gcc.target/i386/pr80969-4.c trunk/gcc/testsuite/gcc.target/i386/pr80969-4.h trunk/gcc/testsuite/gcc.target/i386/pr80969-4a.c trunk/gcc/testsuite/gcc.target/i386/pr80969-4b.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c trunk/gcc/config/i386/i386.h trunk/gcc/doc/sourcebuild.texi trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/lib/target-supports.exp