Skip to content
Snippets Groups Projects
Commit 8cdebe08 authored by Robin Dapp's avatar Robin Dapp
Browse files

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.
parent c2f4a1b7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment