i386: Implement V2SI and V4HI shuffles
authorUros Bizjak <ubizjak@gmail.com>
Tue, 26 May 2020 13:17:51 +0000 (15:17 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Tue, 26 May 2020 13:17:51 +0000 (15:17 +0200)
commit9b8579a6b3664d202db23af60a2ab6cc1f9eb5ae
treebfb72c53a8ac5311b7311f0a4886471533787d45
parentf6615c213354fd3ec7fc6238e61cc26bb1830464
i386: Implement V2SI and V4HI shuffles

2020-05-26  Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog:
* config/i386/mmx.md (*mmx_pshufd_1): New insn pattern.
* config/i386/i386-expand.c (ix86_vectorize_vec_perm_const):
Handle E_V2SImode and E_V4HImode.
(expand_vec_perm_even_odd_1): Handle E_V4HImode.
Assert that E_V2SImode is already handled.
(expand_vec_perm_broadcast_1): Assert that E_V2SImode
is already handled by standard shuffle patterns.

gcc/testsuite/ChangeLog:
* gcc.target/i386/vperm-v2si.c: New test.
* gcc.target/i386/vperm-v4hi.c: Ditto.
gcc/config/i386/i386-expand.c
gcc/config/i386/mmx.md
gcc/testsuite/gcc.target/i386/vperm-v2si.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/vperm-v4hi.c [new file with mode: 0644]