i386: Prefer TARGET_AVX over TARGET_SSE_TYPELESS_STORES
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 28 Jan 2020 19:32:56 +0000 (11:32 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 28 Jan 2020 19:33:12 +0000 (11:33 -0800)
commitdd9b529f08c3c6064c37234922d298336d78caf7
tree7851f3104602455f14e3013c32a8d1a08d450a85
parent6c8e584430bc5dc01b4438f3c38a2a10fcba7685
i386: Prefer TARGET_AVX over TARGET_SSE_TYPELESS_STORES

movaps/movups is one byte shorter than movdqa/movdqu.  But it isn't the
case for AVX nor AVX512.  This patch prefers TARGET_AVX over
TARGET_SSE_TYPELESS_STORES and adjust vmovups checks in assembly ouputs.

gcc/

PR target/91461
* config/i386/i386.md (*movoi_internal_avx): Remove
TARGET_SSE_TYPELESS_STORES check.
(*movti_internal): Prefer TARGET_AVX over
TARGET_SSE_TYPELESS_STORES.
(*movtf_internal): Likewise.
* config/i386/sse.md (mov<mode>_internal): Prefer TARGET_AVX over
TARGET_SSE_TYPELESS_STORES.  Remove "<MODE_SIZE> == 16" check
from TARGET_SSE_TYPELESS_STORES.

gcc/testsuite/

PR target/91461
* gcc.target/i386/avx256-unaligned-store-2.c: Don't check
vmovups.
* gcc.target/i386/avx256-unaligned-store-3.c: Likewise.
* gcc.target/i386/pieces-memcpy-4.c: Likewise.
* gcc.target/i386/pieces-memcpy-5.c: Likewise.
* gcc.target/i386/pieces-memcpy-6.c: Likewise.
* gcc.target/i386/pieces-strcpy-2.c: Likewise.
* gcc.target/i386/pr90980-1.c: Likewise.
* gcc.target/i386/pr87317-4.c: Check "\tvmovd\t" instead of
"vmovd" to avoid matching "vmovdqu".
* gcc.target/i386/pr87317-5.c: Likewise.
* gcc.target/i386/pr87317-7.c: Likewise.
* gcc.target/i386/pr91461-1.c: New test.
* gcc.target/i386/pr91461-2.c: Likewise.
* gcc.target/i386/pr91461-3.c: Likewise.
* gcc.target/i386/pr91461-4.c: Likewise.
* gcc.target/i386/pr91461-5.c: Likewise.
19 files changed:
gcc/ChangeLog
gcc/config/i386/i386.md
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c
gcc/testsuite/gcc.target/i386/pieces-memcpy-4.c
gcc/testsuite/gcc.target/i386/pieces-memcpy-5.c
gcc/testsuite/gcc.target/i386/pieces-memcpy-6.c
gcc/testsuite/gcc.target/i386/pieces-strcpy-2.c
gcc/testsuite/gcc.target/i386/pr87317-4.c
gcc/testsuite/gcc.target/i386/pr87317-5.c
gcc/testsuite/gcc.target/i386/pr87317-7.c
gcc/testsuite/gcc.target/i386/pr90980-1.c
gcc/testsuite/gcc.target/i386/pr91461-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr91461-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr91461-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr91461-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr91461-5.c [new file with mode: 0644]