| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-std=gnu11" } */ |
| 3 |
/* { dg-require-effective-target double64 } */ |
| 4 |
|
| 5 |
typedef double v2df __attribute__((vector_size(2 * sizeof (double)))); |
| 6 |
typedef __INT64_TYPE__ v2di __attribute__((vector_size(2 * sizeof (__INT64_TYPE__)))); |
| 7 |
|
| 8 |
void foo (v2df *res, v2df *src) |
| 9 |
{ |
| 10 |
v2df x = *src; |
| 11 |
*res = __builtin_shuffle ((v2df) { 1.0, 0.0 }, x, (v2di) { 1, 3 }); |
| 12 |
} |
| 13 |
|
| 14 |
int main() |
| 15 |
{ |
| 16 |
v2df x = (v2df) { 0.0, 2.0 }; |
| 17 |
foo (&x, &x); |
| 18 |
if (x[0] != 0.0 || x[1] != 2.0) |
| 19 |
__builtin_abort (); |
| 20 |
return 0; |
| 21 |
} |