_mm_mask_multishift_epi64_epi8
Classification
AVX-512, Bit Manipulation, CPUID Test: AVX512_VBMI
Header File
Instruction
VPMULTISHIFTQB xmm {k}, xmm, xmm
Synopsis
_mm_mask_multishift_epi64_epi8(__m128i src, __mmask16 k, __m128i a, __m128i b);
Description
For each 64-bit element in "b", select 8 unaligned bytes using a byte-granular shift control within the corresponding 64-bit element of "a", and store the 8 assembled bytes to the corresponding 64-bit element of "dst" using writemask "k" (elements are copied from "src" when the corresponding mask bit is not set).
Operation
FOR i := 0 to 1
q := i * 64
FOR j := 0 to 7
tmp8 := 0
ctrl := a[q+j*8+7:q+j*8] & 63
FOR l := 0 to 7
tmp8[l] := b[q+((ctrl+l) & 63)]
ENDFOR
IF k[i*8+j]
dst[q+j*8+7:q+j*8] := tmp8[7:0]
ELSE
dst[q+j*8+7:q+j*8] := src[q+j*8+7:q+j*8]
FI
ENDFOR
ENDFOR
dst[MAX:128] := 0