2 /* { dg-options "-mavx2 -O2" } */
3 /* { dg-require-effective-target avx2 } */
5 #include "avx2-check.h"
8 short_to_ubyte (short iVal
)
30 s1
.x
= _mm256_set_epi16 (1, 2, 3, 4, 6500, 20, 30, 90,
31 88, 44, 33, 22, 11, 98, 78, -1000);
33 s2
.x
= _mm256_set_epi16 (88, 44, 33, 22, 11, 98, 76, -650,
34 1, 2, 3, 4, 6500, 20, 30, 90);
36 u
.x
= _mm256_packus_epi16 (s1
.x
, s2
.x
);
38 for (i
= 0; i
< 8; i
++)
40 e
[i
] = short_to_ubyte (s1
.a
[i
]);
41 e
[i
+ 8] = short_to_ubyte (s2
.a
[i
]);
42 e
[i
+ 16] = short_to_ubyte (s1
.a
[i
+ 8]);
43 e
[i
+ 24] = short_to_ubyte (s2
.a
[i
+ 8]);
46 if (check_union256i_b (u
, e
))