Re: [PATCH] i386: Don't pass -msse2avx to assembler for -mavx

2018-10-07 Thread Gunther Nikl
Uros Bizjak wrote: > On Fri, Oct 5, 2018@1:01 AM H.J. Lu wrote: > > diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h > > index a922c9b93fa..baed87aa54f 100644 > > --- a/gcc/config/i386/gnu-user.h > > +++ b/gcc/config/i386/gnu-user.h > > @@ -67,7 +67,7 @@ along with GCC; see th

Re: [PATCH] i386: Don't pass -msse2avx to assembler for -mavx

2018-10-05 Thread Uros Bizjak
On Fri, Oct 5, 2018 at 1:01 AM H.J. Lu wrote: > > > 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 as

[PATCH] i386: Don't pass -msse2avx to assembler for -mavx

2018-10-04 Thread H.J. Lu
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. W