]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVX512BF16: Do not allow permutation with vcvtne2ps2bf16 [PR115889]
authorHongyu Wang <hongyu.wang@intel.com>
Sat, 13 Jul 2024 03:45:31 +0000 (11:45 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Mon, 15 Jul 2024 02:34:07 +0000 (10:34 +0800)
commit02a3bf5e2f0c18078bf67fc0002219edba1d76ff
tree604905433761b75991c49260ce1e1a582660fde5
parent666f167bec09d1234e6496c86b566fe1a71f61f0
AVX512BF16: Do not allow permutation with vcvtne2ps2bf16 [PR115889]

According to the instruction spec of AVX512BF16, the convert from float
to BF16 is not a simple truncation. It has special handling for
denormal/nan, even for normal float it will add an extra bias according
to the least significant bit for bf number. This means we cannot use the
vcvtne2ps2bf16 for any bf16 vector shuffle.
The optimization introduced in r15-1368 adds a specific split to convert
HImode permutation with this instruction, so remove it and treat the
BFmode permutation same as HFmode.

gcc/ChangeLog:

PR target/115889
* config/i386/predicates.md (vcvtne2ps2bf_parallel): Remove.
* config/i386/sse.md (hi_cvt_bf): Remove.
(HI_CVT_BF): Likewise.
(vpermt2_sepcial_bf16_shuffle_<mode>):Likewise.

gcc/testsuite/ChangeLog:

PR target/115889
* gcc.target/i386/vpermt2-special-bf16-shufflue.c: Adjust output
scan.
gcc/config/i386/predicates.md
gcc/config/i386/sse.md
gcc/testsuite/gcc.target/i386/vpermt2-special-bf16-shufflue.c