2 /* { dg-require-effective-target avx2 } */
3 /* { dg-options "-O2 -mavx2" } */
6 #include "avx2-check.h"
11 compute_pshuflw256 (short *s1
, unsigned char imm
, short *r
)
15 for (i
= 0; i
< 4; i
++)
17 r
[i
] = s1
[(imm
>> (2 * i
)) & 3];
18 r
[i
+ 8] = s1
[((imm
>> (2 * i
)) & 3) + 8];
21 for (i
= 4; i
< 8; i
++)
36 for (i
= 1; i
< 10; i
++)
38 for (j
= 0; j
< 16; j
++)
40 s1
.a
[j
] = j
* i
* sign
;
44 res
.x
= _mm256_shufflelo_epi16 (s1
.x
, N
);
45 compute_pshuflw256 (s1
.a
, N
, res_ref
);
47 fail
+= check_union256i_w (res
, res_ref
);