2 /* { dg-require-effective-target sse4 } */
3 /* { dg-options "-O2 -msse4.2" } */
6 #define CHECK_H "sse4_2-check.h"
10 #define TEST sse4_2_test
15 #include "sse4_2-pcmpstr.h"
20 (_SIDD_SBYTE_OPS | _SIDD_CMP_RANGES | _SIDD_MASKED_POSITIVE_POLARITY)
22 (_SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_EACH | _SIDD_NEGATIVE_POLARITY \
23 | _SIDD_MOST_SIGNIFICANT)
25 (_SIDD_UWORD_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_MASKED_NEGATIVE_POLARITY)
27 (_SIDD_SWORD_OPS | _SIDD_CMP_EQUAL_ORDERED \
28 | _SIDD_MASKED_NEGATIVE_POLARITY | _SIDD_LEAST_SIGNIFICANT)
39 int res
, correct
, l1
, l2
;
42 for (i
= 0; i
< NUM
*16; i
++)
48 for (i
= 0; i
< NUM
; i
++)
53 switch ((rand () % 4))
56 res
= _mm_cmpestri (src1
.x
[i
], l1
, src2
.x
[i
], l2
, IMM_VAL0
);
57 correct
= cmp_ei (&src1
.x
[i
], l1
, &src2
.x
[i
], l2
, IMM_VAL0
,
62 res
= _mm_cmpestri (src1
.x
[i
], l1
, src2
.x
[i
], l2
, IMM_VAL1
);
63 correct
= cmp_ei (&src1
.x
[i
], l1
, &src2
.x
[i
], l2
, IMM_VAL1
,
68 res
= _mm_cmpestri (src1
.x
[i
], l1
, src2
.x
[i
], l2
, IMM_VAL2
);
69 correct
= cmp_ei (&src1
.x
[i
], l1
, &src2
.x
[i
], l2
, IMM_VAL2
,
74 res
= _mm_cmpestri (src1
.x
[i
], l1
, src2
.x
[i
], l2
, IMM_VAL3
);
75 correct
= cmp_ei (&src1
.x
[i
], l1
, &src2
.x
[i
], l2
, IMM_VAL3
,