]> git.ipfire.org Git - thirdparty/gcc.git/commit
x86: Extend AVX512 Vectorization for Popcount in Various Modes
authorLevy Hsu <admin@levyhsu.com>
Wed, 11 Sep 2024 04:49:02 +0000 (14:19 +0930)
committerLevy Hsu <admin@levyhsu.com>
Thu, 26 Sep 2024 02:37:34 +0000 (02:37 +0000)
commit85910e650a61de6da37e3d67a7ac208904dd3c0d
tree018b32600066bd90076e03bd5bad978672986eed
parent78eef8919e2f2973ed7750ba66f5726e70614d07
x86: Extend AVX512 Vectorization for Popcount in Various Modes

This patch enables vectorization of the popcount operation for V2QI, V4QI,
V8QI, V2HI, V4HI, and V2SI modes.

gcc/ChangeLog:

* config/i386/mmx.md:
(VQI_16_32_64): New mode iterator for 8-byte, 4-byte, and 2-byte QImode.
(popcount<mode>2): New pattern for popcount of V2QI/V4QI/V8QI mode.
(popcount<mode>2): New pattern for popcount of V2HI/V4HI mode.
(popcountv2si2): New pattern for popcount of V2SI mode.

gcc/testsuite/ChangeLog:

* gcc.target/i386/part-vect-popcount-1.c: New test.
gcc/config/i386/mmx.md
gcc/testsuite/gcc.target/i386/part-vect-popcount-1.c [new file with mode: 0644]