i386: Add init pattern for V2HI vectors [PR100637]
authorUros Bizjak <ubizjak@gmail.com>
Fri, 4 Jun 2021 15:37:15 +0000 (17:37 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Fri, 4 Jun 2021 15:38:36 +0000 (17:38 +0200)
commit8d7dae0eb366a88a1baba1857ecc54c09e4a520e
tree26b097cfe3f13739104673dded476dad2f05ce00
parentee9548b36a7f17e8a63585b58f340c93dcba95d8
i386: Add init pattern for V2HI vectors [PR100637]

2021-06-03  Uroš Bizjak  <ubizjak@gmail.com>

gcc/
PR target/100637
* config/i386/i386-expand.c (ix86_expand_vector_init_duplicate):
Handle V2HI mode.
(ix86_expand_vector_init_general): Ditto.
Use SImode instead of word_mode for logic operations
when GET_MODE_SIZE (mode) < UNITS_PER_WORD.
(expand_vec_perm_even_odd_1): Assert that V2HI mode should be
implemented by expand_vec_perm_1.
(expand_vec_perm_broadcast_1): Assert that V2HI and V4HI modes
should be implemented using standard shuffle patterns.
(ix86_vectorize_vec_perm_const): Handle V2HImode.  Add V4HI and
V2HI modes to modes, implementable with shuffle for one operand.
* config/i386/mmx.md (*punpckwd): New insn_and_split pattern.
(*pshufw_1): New insn pattern.
(*vec_dupv2hi): Ditto.
(vec_initv2hihi): New expander.

gcc/testsuite/

PR target/100637
* gcc.dg/vect/slp-perm-9.c (dg-final): Adjust dumps for vect32 targets.
gcc/config/i386/i386-expand.c
gcc/config/i386/mmx.md
gcc/testsuite/gcc.dg/vect/slp-perm-9.c