1 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
2 /* { dg-options "-O2 -msse2" } */
4 #include "sse2-check.h"
20 short ins
[8] = { 8, 5, 9, 4, 2, 6, 1, 20 };
24 for (i
= 0; i
< 16; i
++)
27 res
[0].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
29 res
[1].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
31 res
[2].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
33 res
[3].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
35 res
[4].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
37 res
[5].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
39 res
[6].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
41 res
[7].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
44 for (i
= 0; i
< 8; i
++)
47 for (i
= 0; i
< 8; i
++)
50 tmp
.s
[masks
[i
]] = ins
[0];
51 if (memcmp (&tmp
, &res
[i
], sizeof (tmp
)))
55 for (i
= 0; i
< 8; i
++)
57 res
[i
].x
= (__m128i
) __builtin_ia32_vec_set_v8hi ((__v8hi
)val1
.x
,
62 for (i
= 0; i
< 8; i
++)
65 tmp
.s
[masks
[i
]] = ins
[i
];
66 if (memcmp (&tmp
, &res
[i
], sizeof (tmp
)))