2 /* { dg-options "-O2 -msse2" } */
3 /* { dg-require-effective-target sse2 } */
5 #include "sse2-check.h"
21 short ins
[8] = { 8, 5, 9, 4, 2, 6, 1, 20 };
25 for (i
= 0; i
< 16; i
++)
28 res
[0].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
30 res
[1].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
32 res
[2].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
34 res
[3].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
36 res
[4].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
38 res
[5].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
40 res
[6].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
42 res
[7].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
45 for (i
= 0; i
< 8; i
++)
48 for (i
= 0; i
< 8; i
++)
51 tmp
.s
[masks
[i
]] = ins
[0];
52 if (memcmp (&tmp
, &res
[i
], sizeof (tmp
)))
56 for (i
= 0; i
< 8; i
++)
58 res
[i
].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
63 for (i
= 0; i
< 8; i
++)
66 tmp
.s
[masks
[i
]] = ins
[i
];
67 if (memcmp (&tmp
, &res
[i
], sizeof (tmp
)))