| 1 |
/* PR target/124138 */ |
| 2 |
/* { dg-do run } */ |
| 3 |
/* { dg-options "-mavx512f" } */ |
| 4 |
/* { dg-require-effective-target avx512f } */ |
| 5 |
|
| 6 |
#define AVX512F |
| 7 |
#include "avx512f-helper.h" |
| 8 |
|
| 9 |
typedef __attribute__((__vector_size__ (64))) unsigned long long V; |
| 10 |
typedef __attribute__((__vector_size__ (64))) double W; |
| 11 |
|
| 12 |
[[gnu::noipa]] W |
| 13 |
foo (W x) |
| 14 |
{ |
| 15 |
return __builtin_shuffle (x, (V) { 0, 1, 2, 5, 4, 5, 6, 7 }); |
| 16 |
} |
| 17 |
|
| 18 |
void |
| 19 |
TEST () |
| 20 |
{ |
| 21 |
W x = foo ((W) { 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5 }); |
| 22 |
if (x[0] != 1.5 || x[1] != 2.5 || x[2] != 3.5 || x[3] != 6.5 |
| 23 |
|| x[4] != 5.5 || x[5] != 6.5 || x[6] != 7.5 || x[7] != 8.5) |
| 24 |
__builtin_abort (); |
| 25 |
} |