| 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 |
|
| 11 |
[[gnu::noipa]] V |
| 12 |
foo (V x) |
| 13 |
{ |
| 14 |
return __builtin_shuffle (x, (V) { 0, 1, 2, 5, 4, 5, 6, 7 }); |
| 15 |
} |
| 16 |
|
| 17 |
void |
| 18 |
TEST () |
| 19 |
{ |
| 20 |
V x = foo ((V) { 1, 2, 3, 4, 5, 6, 7, 8 }); |
| 21 |
if (x[0] != 1 || x[1] != 2 || x[2] != 3 || x[3] != 6 |
| 22 |
|| x[4] != 5 || x[5] != 6 || x[6] != 7 || x[7] != 8) |
| 23 |
__builtin_abort (); |
| 24 |
} |