This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/86386] [8/9 Regression] unaligned load from stack with -Os -fno-tree-dce -mstringop-strategy=vector_loop -mavx512bw


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86386

--- Comment #7 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Sun Aug  5 12:46:13 2018
New Revision: 263317

URL: https://gcc.gnu.org/viewcvs?rev=263317&root=gcc&view=rev
Log:
i386: Set cfun->machine->max_used_stack_alignment if needed

cfun->machine->max_used_stack_alignment is used to decide how stack frame
should be aligned.  This is independent of any psABIs nor 32-bit vs 64-bit.
It is always safe to compute max_used_stack_alignment.  We compute it only
if 128-bit aligned load/store may be generated on misaligned stack slot
which will lead to segfault.

gcc/

        PR target/86386
        * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
        cfun->machine->max_used_stack_alignment if needed.

gcc/testsuite/

        PR target/86386
        * gcc.target/i386/pr86386.c: New file.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr86386.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]