Developer Guide and Reference

Contents

Compare Intrinsics (MMX™ technology)

This topic summarizes the MMX™ technology compare intrinsics.
To use these intrinsics, include the
immintrin.h
file as follows:
#include <immintrin.h>
Intrinsic
Name
Operation
Corresponding
MMX™ Instruction
_mm_cmpeq_pi8
Equal
PCMPEQB
_mm_cmpeq_pi16
Equal
PCMPEQW
_mm_cmpeq_pi32
Equal
PCMPEQD
_mm_cmpgt_pi8
Greater Than
PCMPGTB
_mm_cmpgt_pi16
Greater Than
PCMPGTW
_mm_cmpgt_pi32
Greater Than
PCMPGTD

_mm_ cmpeq_pi8

__m64 _mm_ cmpeq_pi8(__m64 m1, __m64 m2);
Sets the corresponding 8-bit resulting values to all ones if the 8-bit values in
m1
are equal to the corresponding 8-bit values in
m2
; otherwise sets them to all zeros.

_mm_ cmpeq_pi16

__m64 _mm_ cmpeq_pi16(__m64 m1, __m64 m2);
Sets the corresponding 16-bit resulting values to all ones if the 16-bit values in
m1
are equal to the corresponding 16-bit values in
m2
; otherwise set them to all zeros.

_mm_ cmpeq_pi32

__m64 _mm_ cmpeq_pi32(__m64 m1, __m64 m2);
Sets the corresponding 32-bit resulting values to all ones if the 32-bit values in
m1
are equal to the corresponding 32-bit values in
m2
; otherwise set them to all zeros.

_mm_ cmpgt_pi8

__m64 _mm_ cmpgt_pi8(__m64 m1, __m64 m2);
Sets the corresponding 8-bit resulting values to all ones if the 8-bit signed values in
m1
are greater than the corresponding 8-bit signed values in
m2
; otherwise set them to all zeros.

_mm_ cmpgt_pi16

__m64 _mm_ cmpgt_pi16(__m64 m1, __m64 m2);
Sets the corresponding 16-bit resulting values to all ones if the 16-bit signed values in
m1
are greater than the corresponding 16-bit signed values in
m2
; otherwise set them to all zeros.

_mm_ cmpgt_pi32

__m64 _mm_ cmpgt_pi32(__m64 m1, __m64 m2);
Sets the corresponding 32-bit resulting values to all ones, if the 32-bit signed values in
m1
are greater than the corresponding 32-bit signed values in
m2
; otherwise set them all to zeros.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804