[PATCH] i386: Fix wrong optimization for consecutive masked scatters [PR 101472]

Kong, Lingling lingling.kong@intel.com
Wed Aug 25 06:14:21 GMT 2021


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-i386-Fix-wrong-optimization-for-consecutive-masked-s.patch
Type: application/octet-stream
Size: 11378 bytes
Desc: 0001-i386-Fix-wrong-optimization-for-consecutive-masked-s.patch
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210825/0d20c9b7/attachment-0001.obj>


More information about the Gcc-patches mailing list