_mm256_mask_insertf32x4
Classification
AVX-512, Miscellaneous, CPUID Test: AVX512F
Header File
Instruction
VINSERTF32X4 ymm {k}, ymm, xmm, imm8
Synopsis
_mm256_mask_insertf32x4(__m256 src, __mmask8 k, __m256 a, __m128 b, int imm8);
Description
Copy "a" to "tmp", then insert 128 bits (composed of 4 packed single-precision (32-bit) floating-point elements) from "b" into "tmp" at the location specified by "imm8". Store "tmp" to "dst" using writemask "k" (elements are copied from "src" when the corresponding mask bit is not set).
Operation
tmp[255:0] := a[255:0]
CASE (imm8[0]) OF
0: tmp[127:0] := b[127:0]
1: tmp[255:128] := b[127:0]
ESAC
FOR j := 0 to 7
i := j*32
IF k[j]
dst[i+31:i] := tmp[i+31:i]
ELSE
dst[i+31:i] := src[i+31:i]
FI
ENDFOR
dst[MAX:256] := 0