_mm_maskz_reduce_ss
Classification
AVX-512, Miscellaneous, CPUID Test: AVX512DQ
Header File
immintrin.h
Instruction
VREDUCESS xmm {z}, xmm, xmm, imm8
Synopsis
 _mm_maskz_reduce_ss(__mmask8 k, __m128 a, __m128 b, int imm8);
Description
Extract the reduced argument of the lower single-precision (32-bit) floating-point element in "b" by the number of bits specified by "imm8", store the result in the lower element of "dst" using zeromask "k" (the element is zeroed out when mask bit 0 is not set), and copy the upper 3 packed elements from "a" to the upper elements of "dst". [round_imm_note]
Operation
DEFINE ReduceArgumentPS(src1[31:0], imm8[7:0]) {
	m[31:0] := FP32(imm8[7:4]) // number of fraction bits after the binary point to be preserved
	tmp[31:0] := POW(FP32(2.0), -m) * ROUND(POW(FP32(2.0), m) * src1[31:0], imm8[3:0])
	tmp[31:0] := src1[31:0] - tmp[31:0]
	IF IsInf(tmp[31:0])
		tmp[31:0] := FP32(0.0)
	FI
	RETURN tmp[31:0]
}
IF k[0]
	dst[31:0] := ReduceArgumentPS(b[31:0], imm8[7:0])
ELSE
	dst[31:0] := 0
FI
dst[127:32] := a[127:32]
dst[MAX:128] := 0