IBM Z: Implement TARGET_VECTORIZE_VEC_PERM_CONST for vpdi
authorAndreas Krebbel <krebbel@linux.ibm.com>
Wed, 4 Aug 2021 16:40:11 +0000 (18:40 +0200)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Wed, 4 Aug 2021 16:40:11 +0000 (18:40 +0200)
commit361da782a25031c6ae3967bf8c10a8119845255c
treec4e3fc2396f80bf46c2909346bd3dfae2ccd8395
parent6dc8c4656444153c9e2f98d382de39728a849672
IBM Z: Implement TARGET_VECTORIZE_VEC_PERM_CONST for vpdi

This patch makes use of the vector permute double immediate
instruction for constant permute vectors.

gcc/ChangeLog:

* config/s390/s390.c (expand_perm_with_vpdi): New function.
(vectorize_vec_perm_const_1): Call expand_perm_with_vpdi.
* config/s390/vector.md (*vpdi1<mode>, @vpdi1<mode>): Enable a
parameterized expander.
(*vpdi4<mode>, @vpdi4<mode>): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/s390/vector/perm-vpdi.c: New test.
gcc/config/s390/s390.c
gcc/config/s390/vector.md
gcc/testsuite/gcc.target/s390/vector/perm-vpdi.c [new file with mode: 0644]