2 /* { dg-require-effective-target avx2 } */
3 /* { dg-options "-O2 -mavx2" } */
6 #include "avx2-check.h"
11 compute_pshufd256 (int *s1
, unsigned char imm
, int *r
)
15 for (i
= 0; i
< 4; i
++)
16 r
[i
] = s1
[((N
& (0x3 << (2 * i
))) >> (2 * i
))];
18 for (i
= 0; i
< 4; i
++)
19 r
[i
+ 4] = s1
[((N
& (0x3 << (2 * i
))) >> (2 * i
)) + 4];
30 for (i
= 0; i
< 10; i
++)
32 for (j
= 0; j
< 8; j
++)
34 s1
.a
[j
] = j
* i
* sign
;
38 res
.x
= _mm256_shuffle_epi32 (s1
.x
, N
);
39 compute_pshufd256 (s1
.a
, N
, res_ref
);
41 fail
+= check_union256i_d (res
, res_ref
);