]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Add V8QI and V4QImode partial vector shift operations
authorUros Bizjak <ubizjak@gmail.com>
Tue, 23 May 2023 15:54:39 +0000 (17:54 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Tue, 23 May 2023 15:56:27 +0000 (17:56 +0200)
commitc53f51005de1248ef42b08d32875abf73eb42c3c
tree171e4426bf9441e28f8d4a5cd8ae8eedfa059581
parent751da44bd9032878e3dbebc63f20aafec8794bd2
i386: Add V8QI and V4QImode partial vector shift operations

Add V8QImode and V4QImode vector shift patterns that call into
ix86_expand_vecop_qihi_partial.  Generate special sequences
for constant count operands.

gcc/ChangeLog:

* config/i386/i386-expand.cc (ix86_expand_vecop_qihi_partial):
Call ix86_expand_vec_shift_qihi_constant for shifts
with constant count operand.
* config/i386/i386.cc (ix86_shift_rotate_cost):
Handle V4QImode and V8QImode.
* config/i386/mmx.md (<insn>v8qi3): New insn pattern.
(<insn>v4qi3): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/i386/vect-shiftv4qi.c: New test.
* gcc.target/i386/vect-shiftv8qi.c: New test.
gcc/config/i386/i386-expand.cc
gcc/config/i386/i386.cc
gcc/config/i386/mmx.md
gcc/testsuite/gcc.target/i386/vect-shiftv4qi.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/vect-shiftv8qi.c [new file with mode: 0644]