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>
31 static unsigned int ins
[4] = { 3, 4, 5, 6 };
40 /* Check pinsrd imm8, r32, xmm. */
41 res
[0].x
= _mm_insert_epi32 (val
.x
, ins
[0], msk0
);
42 res
[1].x
= _mm_insert_epi32 (val
.x
, ins
[0], msk1
);
43 res
[2].x
= _mm_insert_epi32 (val
.x
, ins
[0], msk2
);
44 res
[3].x
= _mm_insert_epi32 (val
.x
, ins
[0], msk3
);
51 for (i
= 0; i
< 4; i
++)
54 tmp
.i
[masks
[i
]] = ins
[0];
55 if (memcmp (&tmp
, &res
[i
], sizeof (tmp
)))
59 /* Check pinsrd imm8, m32, xmm. */
60 for (i
= 0; i
< 4; i
++)
62 res
[i
].x
= _mm_insert_epi32 (val
.x
, ins
[i
], msk0
);
66 for (i
= 0; i
< 4; i
++)
69 tmp
.i
[masks
[i
]] = ins
[i
];
70 if (memcmp (&tmp
, &res
[i
], sizeof (tmp
)))