| 1 |
/* { dg-require-effective-target vect_double } */ |
| 2 |
|
| 3 |
#include "tree-vect.h" |
| 4 |
|
| 5 |
double a[2], b[2], c[2]; |
| 6 |
|
| 7 |
void __attribute__((noipa)) foo () |
| 8 |
{ |
| 9 |
double tem0 = a[1] + b[1]; |
| 10 |
double tem1 = a[0] - b[0]; |
| 11 |
c[0] = 2. * tem0; |
| 12 |
c[1] = 5. * tem1; |
| 13 |
} |
| 14 |
|
| 15 |
int main() |
| 16 |
{ |
| 17 |
check_vect (); |
| 18 |
|
| 19 |
a[0] = 1.; a[1] = 3.; |
| 20 |
b[0] = -5.; b[1] = 13.; |
| 21 |
foo (); |
| 22 |
if (c[0] != 32. || c[1] != 30.) |
| 23 |
__builtin_abort (); |
| 24 |
return 0; |
| 25 |
} |
| 26 |
|
| 27 |
/* We'd like to see at most one VEC_PERM_EXPR, not one for a blend |
| 28 |
and one for a permute materialized somewhere else. But addsub |
| 29 |
pattern recog can likely get in the way here. */ |
| 30 |
/* { dg-final { scan-tree-dump-times " \[^ \]\+ = VEC_PERM_EXPR" 1 "slp2" } } */ |