Optimize V16QI/V32QI/V64QI shift by constant.
authorliuhongt <hongtao.liu@intel.com>
Mon, 15 Jun 2020 05:48:45 +0000 (13:48 +0800)
committerliuhongt <hongtao.liu@intel.com>
Wed, 17 Jun 2020 08:03:26 +0000 (16:03 +0800)
commitc7199fb6e694d1a0964351200648c24c3ee97973
tree7e65b3bf5db037efe16f199599ec519325a5d988
parent5fc312a98e9b06eac9e865f511a327b264056d66
Optimize V16QI/V32QI/V64QI shift by constant.

gcc/ChangeLog:
PR target/95524
* config/i386/i386-expand.c
(ix86_expand_vec_shift_qihi_constant): New function.
* config/i386/i386-protos.h
(ix86_expand_vec_shift_qihi_constant): Declare.
* config/i386/sse.md (<shift_insn><mode>3): Optimize shift
V*QImode by constant.

gcc/testsuite/ChangeLog:
* gcc.target/i386/avx2-shiftqihi-constant-1.c: New test.
* gcc.target/i386/avx2-shiftqihi-constant-2.c: Ditto.
* gcc.target/i386/avx512bw-shiftqihi-constant-1.c: Ditto.
* gcc.target/i386/avx512bw-shiftqihi-constant-2.c: Ditto.
* gcc.target/i386/sse2-shiftqihi-constant-1.c: Ditto.
* gcc.target/i386/sse2-shiftqihi-constant-2.c: Ditto.
gcc/config/i386/i386-expand.c
gcc/config/i386/i386-protos.h
gcc/config/i386/sse.md
gcc/testsuite/gcc.target/i386/avx2-shiftqihi-constant-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx2-shiftqihi-constant-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512bw-shiftqihi-constant-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512bw-shiftqihi-constant-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse2-shiftqihi-constant-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse2-shiftqihi-constant-2.c [new file with mode: 0644]