These intrinsics perform packed integer 128-bit comparisons.
Intrinsic Name |
Operation |
Corresponding |
---|---|---|
_mm_testc_si128 |
Check for all ones in specified bits of a 128-bit value |
PTEST |
_mm_testz_si128 |
Check for all zeros in specified bits of a 128-bit value |
PTEST |
_mm_testnzc_si128 |
Check for at least one zero and at least one one in specified bits of a 128-bit value |
PTEST |
int _mm_testz_si128 (__m128i s1, __m128i s2)
Returns 1 if the bitwise AND of s1 and s2 is all zero, else returns 0
int _mm_testc_si128 (__m128i s1, __m128i s2)
Returns 1 if the bitwise AND of s2 ANDNOT of s1 is all ones, else returns 0.
int _mm_testnzc_si128 (__m128i s1, __m128i s2)
Same as (!_mm_testz) && (!_mm_testc)