| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target vect_double } */ |
| 3 |
/* { dg-additional-options "-w -Wno-psabi" } */ |
| 4 |
|
| 5 |
typedef double __attribute__((vector_size(16))) v2df; |
| 6 |
|
| 7 |
v2df f(v2df a, v2df b) |
| 8 |
{ |
| 9 |
return (v2df){a[0] + b[0], a[1] + b[1]}; |
| 10 |
} |
| 11 |
|
| 12 |
v2df g(v2df a, v2df b) |
| 13 |
{ |
| 14 |
return (v2df){a[0] + b[1], a[1] + b[0]}; |
| 15 |
} |
| 16 |
|
| 17 |
/* Verify we manage to vectorize this with using the original vectors |
| 18 |
and do not end up with any vector CTORs. */ |
| 19 |
/* { dg-final { scan-tree-dump-times "optimized: basic block" 2 "slp2" } } */ |
| 20 |
/* { dg-final { scan-tree-dump-not "vect_cst" "slp2" } } */ |