_mm_mask_alignr_epi32
Classification
AVX-512, Miscellaneous, CPUID Test: AVX512F
Header File
Instruction
VALIGND xmm {k}, xmm, xmm, imm8
Synopsis
_mm_mask_alignr_epi32(__m128i src, __mmask8 k, __m128i a, __m128i b, const int imm8);
Description
Concatenate "a" and "b" into a 32-byte immediate result, shift the result right by "imm8" 32-bit elements, and store the low 16 bytes (4 elements) in "dst" using writemask "k" (elements are copied from "src" when the corresponding mask bit is not set).
Operation
temp[255:128] := a[127:0]
temp[127:0] := b[127:0]
temp[255:0] := temp[255:0] >> (32*imm8[1:0])
FOR j := 0 to 3
i := j*32
IF k[j]
dst[i+31:i] := temp[i+31:i]
ELSE
dst[i+31:i] := src[i+31:i]
FI
ENDFOR
dst[MAX:128] := 0