]> git.ipfire.org Git - thirdparty/gcc.git/commit
x86: Fix *vec_dupv4hi constraints [PR94942]
authorJakub Jelinek <jakub@redhat.com>
Tue, 5 May 2020 09:33:47 +0000 (11:33 +0200)
committerJakub Jelinek <jakub@redhat.com>
Thu, 7 May 2020 13:20:24 +0000 (15:20 +0200)
commit1b53c1169a6d0b10d43de0a56aabf7386b67496b
tree64f61612d605eb95bd39fb1cdd1a55ef8374487f
parenta764bbb72ae2f732f5ccfec2c8331388ac3f7b62
x86: Fix *vec_dupv4hi constraints [PR94942]

This insn and split splits into HI->V?HImode broadcast for avx2 and later,
but either the operands need to be %xmm0-%xmm15 (i.e. VEX encoded insn), or
the insn needs both AVX512BW and AVX512VL.
Now, Yv constraint is v for AVX512VL and x otherwise, so for -mavx512vl -mno-avx512bw
we ICE if we end up with a %xmm16+ register from RA.
Yw constraint is v for AVX512VL and AVX512BW and nothing otherwise, so
in this pattern we actually need xYw.

2020-05-05  Jakub Jelinek  <jakub@redhat.com>

PR target/94942
* config/i386/mmx.md (*vec_dupv4hi): Use xYw constraints instead of Yv.

* gcc.target/i386/pr94942.c: New test.
gcc/ChangeLog
gcc/config/i386/mmx.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr94942.c [new file with mode: 0644]