https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115889
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Hongyu Wang <hong...@gcc.gnu.org>: https://gcc.gnu.org/g:02a3bf5e2f0c18078bf67fc0002219edba1d76ff commit r15-2030-g02a3bf5e2f0c18078bf67fc0002219edba1d76ff Author: Hongyu Wang <hongyu.w...@intel.com> Date: Sat Jul 13 11:45:31 2024 +0800 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.