aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2018-10-05 11:29:44 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2018-10-05 04:29:44 -0700
commitae36de91537f1568e0f50bd55b5b976b8289cdc1 (patch)
treee4482cf1bd396baa0cd4c01523b536a34acf5280 /gcc
parent49022a8b837e77020b0e03ce8b9c70e67bd59872 (diff)
downloadgcc-ae36de91537f1568e0f50bd55b5b976b8289cdc1.zip
gcc-ae36de91537f1568e0f50bd55b5b976b8289cdc1.tar.gz
gcc-ae36de91537f1568e0f50bd55b5b976b8289cdc1.tar.bz2
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. 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. From-SVN: r264864
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/gnu-user.h2
-rw-r--r--gcc/config/i386/gnu-user64.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e5575fe..e9edd10 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ 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.
+
2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
PR target/87509
diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
index a922c9b..baed87a 100644
--- a/gcc/config/i386/gnu-user.h
+++ b/gcc/config/i386/gnu-user.h
@@ -67,7 +67,7 @@ along with GCC; see the file COPYING3. If not see
#undef ASM_SPEC
#define ASM_SPEC \
- "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
+ "--32 %{msse2avx:%{!mavx:-msse2avx}}"
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
index f7a68fd..09141ce 100644
--- a/gcc/config/i386/gnu-user64.h
+++ b/gcc/config/i386/gnu-user64.h
@@ -50,7 +50,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define ASM_SPEC "%{" SPEC_32 ":--32} \
%{" SPEC_64 ":--64} \
%{" SPEC_X32 ":--x32} \
- %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
+ %{msse2avx:%{!mavx:-msse2avx}}"
#define GNU_USER_TARGET_LINK_SPEC \
"%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \