The equality and inequality comparison operands can have mixed signedness, but they must be of the same size. The comparison operators for less-than and greater-than must be of the same sign and size.
Example of Syntax Usage for Comparison Operator
The nearest common ancestor is returned for compare for equal/not-equal operations.
C = cmpneq(A,B);
Type cast needed for different-sized elements for equal/not-equal comparisons.
Iu8vec8 A, C;
C = cmpeq(A,(Iu8vec8)B);
Type cast needed for sign or size differences for less-than and greater-than comparisons.
Is16vec4 B, C;
C = cmpge((Is16vec4)A,B);
C = cmpgt(B,C);
Inequality Comparison Symbols and Corresponding Intrinsics
R = cmpeq(A, B)
R = cmpneq(A, B)