| 1 |
/* PR target/101021 */ |
| 2 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 3 |
/* { dg-options "-O2 -mavx" } */ |
| 4 |
/* { dg-final { scan-assembler-not "vpshufb" } } */ |
| 5 |
|
| 6 |
typedef char S; |
| 7 |
typedef S V __attribute__((vector_size(8 * sizeof(S)))); |
| 8 |
|
| 9 |
V t1 (V x) |
| 10 |
{ |
| 11 |
return __builtin_shuffle (x, (V) { 4,5,6,7, 0,1,2,3 }); |
| 12 |
} |
| 13 |
|
| 14 |
/* { dg-final { scan-assembler "vpshufd" } } */ |
| 15 |
|
| 16 |
V t2 (V x) |
| 17 |
{ |
| 18 |
return __builtin_shuffle (x, (V) { 0,1, 2,3, 2,3, 6,7 }); |
| 19 |
} |
| 20 |
|
| 21 |
/* { dg-final { scan-assembler "vpshuflw" } } */ |