]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add UNSPEC_MASKOP to kupck<mode> instructions in sse.md on x86.
authorRoger Sayle <roger@nextmovesoftware.com>
Mon, 18 Jul 2022 06:36:13 +0000 (07:36 +0100)
committerRoger Sayle <roger@nextmovesoftware.com>
Mon, 18 Jul 2022 06:36:13 +0000 (07:36 +0100)
commitf9da2663f500f473f6ae309e3349a65e6f02001b
tree91ced4d16705e611d473066a8105cccd5b687290
parent6d7071776e039d9eedf468636dcd942cb4621199
Add UNSPEC_MASKOP to kupck<mode> instructions in sse.md on x86.

This AVX512 specific patch to sse.md is split out from an earlier patch:
https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596199.html

The new splitters proposed in that patch interfere with AVX512's
kunpckdq instruction which is defined as identical RTL,
DW:DI = (HI:SI<<32)|zero_extend(LO:SI).  To distinguish these,
and avoid AVX512 mask registers accidentally being (ab)used by reload
to perform SImode scalar shifts, this patch adds the explicit
(unspec UNSPEC_MASKOP) to the unpack mask operations, which matches
what sse.md does for the other mask specific (logic) operations.

2022-07-18  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog
* config/i386/sse.md (kunpckhi): Add UNSPEC_MASKOP unspec.
(kunpcksi): Likewise, add UNSPEC_MASKOP unspec.
(kunpckdi): Likewise, add UNSPEC_MASKOP unspec.
(vec_pack_trunc_qi): Update to specify the now required
UNSPEC_MASKOP unspec.
(vec_pack_trunc_<mode>): Likewise.
gcc/config/i386/sse.md