]> git.ipfire.org Git - thirdparty/gcc.git/commit
s390: Use vpdi and verllg in vec_reve.
authorRobin Dapp <rdapp@linux.ibm.com>
Fri, 24 Jun 2022 13:15:14 +0000 (15:15 +0200)
committerRobin Dapp <rdapp@linux.ibm.com>
Mon, 29 Aug 2022 09:15:09 +0000 (11:15 +0200)
commit8cdebe087619329facf19ba849d4d489a9a933e2
tree54930cc530a8acdd510fb04acfb757d5a378815c
parentc2f4a1b7d104427165f609bac830bb59504ec99e
s390: Use vpdi and verllg in vec_reve.

Swapping the two elements of a V2DImode or V2DFmode vector can be done
with vpdi instead of using the generic way of loading a permutation mask
from the literal pool and vperm.

Analogous to the V2DI/V2DF case reversing the elements of a four-element
vector can be done by first swapping the elements of the first
doubleword as well the ones of the second one and subsequently rotate
the doublewords by 32 bits.

gcc/ChangeLog:

PR target/100869
* config/s390/vector.md (@vpdi4_2<mode>): New pattern.
(rotl<mode>3_di): New pattern.
* config/s390/vx-builtins.md: Use vpdi and verll for reversing
elements.

gcc/testsuite/ChangeLog:

* gcc.target/s390/zvector/vec-reve-int-long.c: New test.
gcc/config/s390/vector.md
gcc/config/s390/vx-builtins.md
gcc/testsuite/gcc.target/s390/zvector/vec-reve-int-long.c [new file with mode: 0644]