_mm512_mask_alignr_epi64
Classification
AVX-512, Miscellaneous, CPUID Test: AVX512F
Header File
Instruction
VALIGNQ zmm {k}, zmm, zmm, imm8
Synopsis
_mm512_mask_alignr_epi64(__m512i src, __mmask8 k, __m512i a, __m512i b, const int imm8);
Description
Concatenate "a" and "b" into a 128-byte immediate result, shift the result right by "imm8" 64-bit elements, and store the low 64 bytes (8 elements) in "dst" using writemask "k" (elements are copied from "src" when the corresponding mask bit is not set).
Operation
temp[1023:512] := a[511:0]
temp[511:0] := b[511:0]
temp[1023:0] := temp[1023:0] >> (64*imm8[2:0])
FOR j := 0 to 7
i := j*64
IF k[j]
dst[i+63:i] := temp[i+63:i]
ELSE
dst[i+63:i] := src[i+63:i]
FI
ENDFOR
dst[MAX:512] := 0