Hi,

For avx512f_scattersi<VI48F:mode>, mask operand only affect set src, we
need to refine the pattern to let gcc know mask register also affect the dest.
So we put mask operand into UNSPEC_VSIBADDR.

Bootstrapped and regression tested on x86_64-linux-gnu{-m32,-m64}.
Ok for master?

gcc/ChangeLog:

*config/i386/sse.md (<avx512>scattersi<mode>): Add mask operand to
UNSPEC_VSIBADDR.
(<avx512>scattersi<mode>): Likewise.
(*avx512f_scattersi<VI48F:mode>): Merge mask operand
to set_dest.
(*avx512f_scatterdi<VI48F:mode>): Likewise

gcc/testsuite/ChangeLog:

*gcc.target/i386/avx512f-pr101472.c: New test.
*gcc.target/i386/avx512vl-pr101472.c: Ditto.

Attachment: 0001-i386-Fix-wrong-optimization-for-consecutive-masked-s.patch
Description: 0001-i386-Fix-wrong-optimization-for-consecutive-masked-s.patch

Reply via email to