i386: Allow MMX intrinsic emulation with SSE
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 15 May 2019 15:32:33 +0000 (15:32 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 15 May 2019 15:32:33 +0000 (08:32 -0700)
commitecfdb16c54ad06ac23193e5de292fc71e5958526
treeb79a73d141c252d663dabc74bf397f1836f33806
parentd4410ec0ab4e3d2c834a811acf9e39af32e1d1d8
i386: Allow MMX intrinsic emulation with SSE

Allow MMX intrinsic emulation with SSE/SSE2/SSSE3.  Don't enable MMX ISA
by default with TARGET_MMX_WITH_SSE.

For pr82483-1.c and pr82483-2.c, "-mssse3 -mno-mmx" compiles in 64-bit
mode since MMX intrinsics can be emulated wit SSE.

gcc/

PR target/89021
* config/i386/i386-builtin.def: Enable MMX intrinsics with
SSE/SSE2/SSSE3.
* config/i386/i386-builtins.c (ix86_init_mmx_sse_builtins):
Likewise.
* config/i386/i386-expand.c (ix86_expand_builtin): Allow
SSE/SSE2/SSSE3 to emulate MMX intrinsics with TARGET_MMX_WITH_SSE.
* config/i386/mmintrin.h: Only require SSE2 if __MMX_WITH_SSE__
is defined.

gcc/testsuite/

PR target/89021
* gcc.target/i386/pr82483-1.c: Error only on ia32.
* gcc.target/i386/pr82483-2.c: Likewise.

From-SVN: r271252
gcc/ChangeLog
gcc/config/i386/i386-builtin.def
gcc/config/i386/i386-builtins.c
gcc/config/i386/i386-expand.c
gcc/config/i386/mmintrin.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr82483-1.c
gcc/testsuite/gcc.target/i386/pr82483-2.c