Is there any way to exchange the middle two 64 bits in a 256 bit AVX(YMM) register?
I know we can leverage VPERM2F128 to swap the low 128 and high 128 bits, and vshufps seems could only work inside both high and low 128 bits.
So I am wondering is there any efficient instructions to work for this typical situation?
Thanks in advance!
Thank you all! I found AVX2 vpermq may well work for this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With