2 ms·
I was anticipating a SIMD shuffle/permute instruction like vpermq, it won't allocate more ram-memory per-se. Anyways, here is what google search AI gave me as
by notepad0x90 10mo ago
I was anticipating a SIMD shuffle/permute instruction like vpermq, it won't allocate more ram-memory per-se.
Anyways, here is what google search AI gave me as an example of how that would work (I don't know this stuff well enough myself):
; Assume ymm0 contains [A, B, C, D] (Q0=A, Q1=B, Q2=C, Q3=D)
; The immediate 0xd8 (11011000 in binary) means:
; - Keep Q0 (index 0)
; - Swap Q1 (index 1) with Q2 (index 2) (110, 011 in binary for bits 1,2)
; - Keep Q3 (index 3)
vpermq ymm0, ymm0, 0xd8
; ymm0 now contains [A, C, B, D]