1 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
2 /* { dg-require-effective-target sse4 } */
3 /* { dg-options "-O2 -msse4.2" } */
5 #include "sse4_2-check.h"
6 #include "sse4_2-pcmpstr.h"
11 (SIDD_SBYTE_OPS | SIDD_CMP_RANGES | SIDD_MASKED_POSITIVE_POLARITY)
13 (SIDD_UBYTE_OPS | SIDD_CMP_EQUAL_EACH | SIDD_NEGATIVE_POLARITY \
14 | SIDD_MOST_SIGNIFICANT)
16 (SIDD_UWORD_OPS | SIDD_CMP_EQUAL_ANY | SIDD_MASKED_NEGATIVE_POLARITY)
18 (SIDD_SWORD_OPS | SIDD_CMP_EQUAL_ORDERED \
19 | SIDD_MASKED_NEGATIVE_POLARITY | SIDD_MOST_SIGNIFICANT)
33 for (i
= 0; i
< NUM
*16; i
++)
39 for (i
= 0; i
< NUM
; i
++)
41 switch ((rand () % 4))
44 res
= _mm_cmpistri (src1
.x
[i
], src2
.x
[i
], IMM_VAL0
);
45 correct
= cmp_ii (&src1
.x
[i
], &src2
.x
[i
], IMM_VAL0
, NULL
);
49 res
= _mm_cmpistri (src1
.x
[i
], src2
.x
[i
], IMM_VAL1
);
50 correct
= cmp_ii (&src1
.x
[i
], &src2
.x
[i
], IMM_VAL1
, NULL
);
54 res
= _mm_cmpistri (src1
.x
[i
], src2
.x
[i
], IMM_VAL2
);
55 correct
= cmp_ii (&src1
.x
[i
], &src2
.x
[i
], IMM_VAL2
, NULL
);
59 res
= _mm_cmpistri (src1
.x
[i
], src2
.x
[i
], IMM_VAL3
);
60 correct
= cmp_ii (&src1
.x
[i
], &src2
.x
[i
], IMM_VAL3
, NULL
);