_mm256_mask_alignr_epi64
Classification
AVX-512, Miscellaneous, CPUID Test: AVX512F
Header File
immintrin.h
Instruction
VALIGNQ ymm {k}, ymm, ymm, imm8
Synopsis
 _mm256_mask_alignr_epi64(__m256i src, __mmask8 k, __m256i a, __m256i b, const int imm8);
Description
Concatenate "a" and "b" into a 64-byte immediate result, shift the result right by "imm8" 64-bit elements, and store the low 32 bytes (4 elements) in "dst" using writemask "k" (elements are copied from "src" when the corresponding mask bit is not set).
Operation
temp[511:256] := a[255:0]
temp[255:0] := b[255:0]
temp[511:0] := temp[511:0] >> (64*imm8[1:0])
FOR j := 0 to 3
	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:256] := 0