[PATCH] Optimize V*QImode shift by constant using same operation on V*HImode [PR95524]
Hongtao Liu
crazylht@gmail.com
Mon Jun 15 13:29:29 GMT 2020
Hi:
Basically i "copy" this optimization from clang i386 backend, Refer
to pr95524 for details.
Bootstrap is ok, regression test on i386/x86-64 backend is ok.
gcc/ChangeLog:
PR target/95524
* gcc/config/i386/i386-expand.c
(ix86_expand_vec_shift_qihi_constant): New function.
* gcc/config/i386/i386-protos.h: Declare.
* gcc/config/i386/sse.md: 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.
--
BR,
Hongtao
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Optimize-V16QI-V32QI-V64QI-shift-by-constant.patch
Type: application/octet-stream
Size: 15201 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200615/a7524ae0/attachment.obj>
More information about the Gcc-patches
mailing list