_mm256_testz_ps
Classification
AVX_ALL, Logical, CPUID Test: AVX
Header File
immintrin.h
Instruction
VTESTPS ymm, ymm
Synopsis
 _mm256_testz_ps(__m256 a, __m256 b);
Description
Compute the bitwise AND of 256 bits (representing single-precision (32-bit) floating-point elements) in "a" and "b", producing an intermediate 256-bit value, and set "ZF" to 1 if the sign bit of each 32-bit element in the intermediate value is zero, otherwise set "ZF" to 0. Compute the bitwise NOT of "a" and then AND with "b", producing an intermediate value, and set "CF" to 1 if the sign bit of each 32-bit element in the intermediate value is zero, otherwise set "CF" to 0. Return the "ZF" value.
Operation
tmp[255:0] := a[255:0] AND b[255:0]
IF (tmp[31] == 0 && tmp[63] == 0 && tmp[95] == 0 && tmp[127] == 0 && \
    tmp[159] == 0 && tmp[191] == 0 && tmp[223] == 0 && tmp[255] == 0)
	ZF := 1
ELSE
	ZF := 0
FI
tmp[255:0] := (NOT a[255:0]) AND b[255:0]
IF (tmp[31] == 0 && tmp[63] == 0 && tmp[95] == 0 && tmp[127] == 0 && \
    tmp[159] == 0 && tmp[191] == 0 && tmp[223] == 0 && tmp[255] == 0)
	CF := 1
ELSE
	CF := 0
FI
dst := ZF