CMPPS - CoMPare Packed Single

CMPPS xmm1, xmm2/m128, imm8    (S1
__m128 _mm_cmp_ps(__m128 a, __m128 b, int imm8)

For each float, if the condition specified in imm8 is met, store 1, else store 0, in all bits of the corresponding float of (3).
VCMPPS xmm1, xmm2, xmm3/m128, imm8    (V1
__m128 _mm_cmp _ps(__m128 a, __m128 b, int imm8)

For each float, if the condition specified in imm8 is met, store 1, else store 0, in all bits of the corresponding float of (3).
VCMPPS ymm1, ymm2, ymm3/m256, imm8    (V1
__m256 _mm256_cmp_ps(__m256 a, __m256 b, int imm8)

For each float, if the condition specified in imm8 is met, store 1, else store 0, in all bits of the corresponding float of (3).
VCMPPS k1{k2}, xmm2, xmm3/m128/m32bcst, imm8    (V5+VL
__mmask8 _mm_cmp_ps_mask(__m128 a, __m128 b, int imm8)
__mmask8 _mm_mask_cmp_ps_mask(__mmask8 k2, __m128 a, __m128 b, int imm8)

For each float, if the condition specified in imm8 is met, store 1, else store 0, in the corresponding bit of (3).
If k2 bit is 0, the comparison is not done and the corresponding bit of (3) is set to zero. Upper bits of (3) are zero cleared.
VCMPPS k1{k2}, ymm2, ymm3/m256/m32bcst, imm8    (V5+VL
__mmask8 _mm256_cmp_ps_mask(__m256 a, __m256 b, int imm8)
__mmask8 _mm256_mask_cmp_ps_mask(__mmask8 k2, __m256 a, __m256 b, int imm8)

For each float, if the condition specified in imm8 is met, store 1, else store 0, in the corresponding bit of (3).
If k2 bit is 0, the comparison is not done and the corresponding bit of (3) is set to zero. Upper bits of (3) are zero cleared.
VCMPPS k1{k2}, zmm2, zmm3/m512/m32bcst{sae}, imm8    (V5
__mmask16 _mm512_cmp_ps_mask(__m512 a, __m512 b, int imm8)
__mmask16 _mm512_mask_cmp_ps_mask(__mmask16 k2, __m512 a, __m512 b, int imm8)
__mmask16 _mm512_cmp_round_ps_mask(__m512 a, __m512 b, int imm8, int sae)
__mmask16 _mm512_mask_cmp_round_ps_mask(__mmask16 k2, __m512 a, __m512 b, int imm8, int sae)

For each float, if the condition specified in imm8 is met, store 1, else store 0, in the corresponding bit of (3).
If k2 bit is 0, the comparison is not done and the corresponding bit of (3) is set to zero. Upper bits of (3) are zero cleared.

imm8

when either (or both) is Nan condition unmet
(Ordered)
condition met
(Unordered)
Exception on QNaN YES
(Signaling)
NO
(Quiet)
YES
(Signaling)
NO
(Quiet)
compare for == 10h
_CMP_EQ_OS
0h
_CMP_EQ_OQ
18h
_CMP_EQ_US
8h
_CMP_EQ_UQ
compare for < 1h
_CMP_LT_OS
11h
_CMP_LT_OQ
   
compare for <= 2h
_CMP_LE_OS
12h
_CMP_LE_OQ
compare for > 0Eh
_CMP_GT_OS
1Eh
_CMP_GT_OQ
   
compare for >= 0Dh
_CMP_GE_OS
1Dh
_CMP_GE_OQ
   
compare for != 1Ch
_CMP_NEQ_OS
0Ch
_CMP_NEQ_OQ
14h
_CMP_NEQ_US
04h
_CMP_NEQ_UQ
compare for ! < 5h
_CMP_NLT_US
15h
_CMP_NLT_UQ
compare for ! <=     6h
_CMP_NLE_US
16h
_CMP_NLE_UQ
compare for ! > 0Ah
_CMP_NGT_US
1Ah
_CMP_NGT_UQ
compare for ! >=     9h
_CMP_NGE_US
19h
_CMP_NGE_UQ
compare for ordered 17h
_CMP_ORD_S
7h
_CMP_ORD_Q
compare for unordered     13h
_CMP_UNORD_S
3h
_CMP_UNORD_Q
TRUE 1Fh
_CMP_TRUE_US
0Fh
_CMP_TRUE_UQ
FALSE 1Bh
_CMP_FALSE_OS
0Bh
_CMP_FALSE_OQ
   

Values >= 8h listed above are only for VCMPPS instruction. Cannot be specified in CMPPS instruction.


x86/x64 SIMD Instruction List  Feedback