i386: Remove broadcasts from TARGET_MMX_WITH_SSE vec_dup insn patterns
authorUros Bizjak <ubizjak@gmail.com>
Mon, 25 May 2020 14:11:18 +0000 (16:11 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Mon, 25 May 2020 14:11:18 +0000 (16:11 +0200)
commit14cd049afcb992ac334b4a2ad7be42ee78fe31eb
tree7f035729f52218faf7718c67333be9e841e5ca82
parenta42cc1f883f7a4aabd7f29e2fb842a51a213e37d
i386: Remove broadcasts from TARGET_MMX_WITH_SSE vec_dup insn patterns

XMM broadcast instructions broadcast value from general reg to all
elements of the vector.  This is not allowed for TARGET_MMX_WITH_SSE,
where it is expected that bits outside lower 64bits load or retain
zero value.  Following testcases expect broadcast, and are thus invalid:

FAIL: gcc.target/i386/sse2-mmx-18b.c scan-assembler-not movd
FAIL: gcc.target/i386/sse2-mmx-18b.c scan-assembler-times pbroadcastd 1
FAIL: gcc.target/i386/sse2-mmx-19b.c scan-assembler-not movd
FAIL: gcc.target/i386/sse2-mmx-19b.c scan-assembler-times pbroadcastw 1
FAIL: gcc.target/i386/sse2-mmx-19d.c scan-assembler-times pbroadcastw 1
FAIL: gcc.target/i386/sse2-mmx-19e.c scan-assembler-times pbroadcastw 1

These testcases are removed entirely.

2020-05-25  Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog:
* config/i386/mmx.md (*vec_dupv2sf): Redefine as define_insn.
(mmx_pshufw_1): Change Yv constraint to xYw.  Correct type attribute.
(*vec_dupv4hi): Redefine as define_insn.
Remove alternative with general register input.
(*vec_dupv2si): Ditto.

gcc/testsuite/ChangeLog:
* gcc.target/i386/sse2-mmx-18a.c (dg-options): Remove -mno-avx512vl.
* gcc.target/i386/sse2-mmx-19a.c (dg-options): Remove -mno-avx.
* gcc.target/i386/sse2-mmx-18b.c: Remove.
* gcc.target/i386/sse2-mmx-18c.c: Ditto.
* gcc.target/i386/sse2-mmx-19b.c: Ditto.
* gcc.target/i386/sse2-mmx-19c.c: Ditto.
* gcc.target/i386/sse2-mmx-19d.c: Ditto.
* gcc.target/i386/sse2-mmx-19e.c: Ditto.
gcc/ChangeLog
gcc/config/i386/mmx.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/sse2-mmx-18a.c
gcc/testsuite/gcc.target/i386/sse2-mmx-18b.c [deleted file]
gcc/testsuite/gcc.target/i386/sse2-mmx-18c.c [deleted file]
gcc/testsuite/gcc.target/i386/sse2-mmx-19a.c
gcc/testsuite/gcc.target/i386/sse2-mmx-19b.c [deleted file]
gcc/testsuite/gcc.target/i386/sse2-mmx-19c.c [deleted file]
gcc/testsuite/gcc.target/i386/sse2-mmx-19d.c [deleted file]
gcc/testsuite/gcc.target/i386/sse2-mmx-19e.c [deleted file]