_mm_mask_compress_epi8
Classification
AVX-512, Swizzle, CPUID Test: AVX512_VBMI2
Header File
immintrin.h
Instruction
VPCOMPRESSB xmm {k}, xmm
Synopsis
 _mm_mask_compress_epi8(__m128i src, __mmask16 k, __m128i a);
Description
Contiguously store the active 8-bit integers in "a" (those with their respective bit set in writemask "k") to "dst", and pass through the remaining elements from "src".
Operation
size := 8
m := 0
FOR j := 0 to 15
	i := j*8
	IF k[j]
		dst[m+size-1:m] := a[i+7:i]
		m := m + size
	FI
ENDFOR
dst[127:m] := src[127:m]
dst[MAX:128] := 0