2 /* { dg-require-effective-target avx } */
3 /* { dg-options "-O2 -mavx" } */
11 #define mask_v(pos) ((CTRL & (0x3 << (pos))) >> (pos))
18 int m
[8] = {mask_v(0), mask_v(1), mask_v(2), mask_v(3), mask_v(4), mask_v(5), mask_v(6), mask_v(7)};
21 s
.x
= _mm256_set_ps (1, 2, 3, 4, 5, 6, 7, 8);
22 ctl
.x
= _mm256_loadu_si256((__m256i
*) m
);
23 u
.x
= _mm256_permutevar_ps(s
.x
, ctl
.x
);
25 e
[0] = s
.a
[0 + (m
[0] & 0x03)];
26 e
[1] = s
.a
[0 + (m
[1] & 0x03)];
27 e
[2] = s
.a
[0 + (m
[2] & 0x03)];
28 e
[3] = s
.a
[0 + (m
[3] & 0x03)];
29 e
[4] = s
.a
[4 + (m
[4] & 0x03)];
30 e
[5] = s
.a
[4 + (m
[5] & 0x03)];
31 e
[6] = s
.a
[4 + (m
[6] & 0x03)];
32 e
[7] = s
.a
[4 + (m
[7] & 0x03)];
34 if (check_union256 (u
, e
))