2 /* { dg-require-effective-target sse4 } */
3 /* { dg-options "-O2 -msse4.1" } */
6 #define CHECK_H "sse4_1-check.h"
10 #define TEST sse4_1_test
15 #include <smmintrin.h>
18 make_ptestnzc (__m128i m
, __m128i v
)
31 for (i
= 0; i
< 16; i
++)
33 if ((mask
.c
[i
] & val
.c
[i
]))
35 if ((~mask
.c
[i
] & val
.c
[i
]))
39 return (z
== 0 && c
== 0) ? 1 : 0;
53 val
[0].i
[0] = 0x11111111;
54 val
[0].i
[1] = 0x00000000;
55 val
[0].i
[2] = 0x00000000;
56 val
[0].i
[3] = 0x11111111;
58 val
[1].i
[0] = 0x00000000;
59 val
[1].i
[1] = 0x11111111;
60 val
[1].i
[2] = 0x11111111;
61 val
[1].i
[3] = 0x00000000;
68 val
[3].i
[0] = 0xffffffff;
69 val
[3].i
[1] = 0xffffffff;
70 val
[3].i
[2] = 0xffffffff;
71 val
[3].i
[3] = 0xffffffff;
74 for(i
= 0; i
< 4; i
++)
75 for(j
= 0; j
< 4; j
++)
77 res
[l
++] = _mm_testnzc_si128 (val
[j
].x
, val
[i
].x
);
78 res
[l
++] = _mm_testnzc_si128 (val
[j
].x
, val
[i
].x
);
82 for(i
= 0; i
< 4; i
++)
83 for(j
= 0; j
< 4; j
++)
85 if (res
[l
++] != make_ptestnzc (val
[j
].x
, val
[i
].x
))
87 if (res
[l
++] != make_ptestnzc (val
[j
].x
, val
[i
].x
))
91 if (res
[2] != _mm_testnzc_si128 (val
[1].x
, val
[0].x
))
94 if (res
[3] != _mm_testnzc_si128 (val
[1].x
, val
[0].x
))