2 /* { dg-require-effective-target avx2 } */
3 /* { dg-options "-O2 -mavx2" } */
6 #include "avx2-check.h"
11 compute_pshufhw256 (short *s1
, unsigned char imm
, short *r
)
15 for (i
= 0; i
< 4; i
++)
21 for (i
= 4; i
< 8; i
++)
23 r
[i
] = s1
[((imm
>> (2 * (i
- 4))) & 3) + 4];
24 r
[i
+ 8] = s1
[((imm
>> (2 * (i
- 4))) & 3) + 12];
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_shufflehi_epi16 (s1
.x
, N
);
45 compute_pshufhw256 (s1
.a
, N
, res_ref
);
47 fail
+= check_union256i_w (res
, res_ref
);