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

--- Comment #7 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Fri Oct 12 12:34:36 2018
New Revision: 265090

URL: https://gcc.gnu.org/viewcvs?rev=265090&root=gcc&view=rev
Log:
i386: Don't pass -msse2avx to assembler for -mavx

With

gcc -O2 -fPIC -flto -g -c -o a.o a.c
gcc -O2 -fPIC -flto -g -mavx   -c -o b.o b.c
gcc -shared -O2 -fPIC -flto -g -o lib1.so a.o b.o

LTO correctly generates AVX for b.o and SSE for a.o.  But the GCC driver
passes -msse2avx to assembler, which encodes SSE instructions as AVX
instructions.  We shouldn't pass -msse2avx to assembler for -mavx.

        Backport from mainline
        PR target/87522
        * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
        assembler for -mavx.
        * config/i386/gnu-user64.h (ASM_SPEC): Likewise.

Modified:
    branches/gcc-6-branch/gcc/ChangeLog
    branches/gcc-6-branch/gcc/config/i386/gnu-user.h
    branches/gcc-6-branch/gcc/config/i386/gnu-user64.h

Reply via email to