| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -ftree-vectorize -mdejagnu-cpu=power8 -mvsx -ffast-math -fvect-cost-model=unlimited" } */ |
| 3 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 4 |
|
| 5 |
/* This tests special handling for various uses of xxpermdi, other than |
| 6 |
to perform doubleword swaps. */ |
| 7 |
|
| 8 |
void foo (_Complex double *self, _Complex double *a, _Complex double *b, |
| 9 |
int a1, int a2) |
| 10 |
{ |
| 11 |
int i, j; |
| 12 |
for (i = 0; i < a1; ++i) |
| 13 |
for (j = 0; j < a2; ++j) |
| 14 |
self[i] = self[i] + a[i,j] * b[j]; |
| 15 |
} |
| 16 |
|
| 17 |
/* { dg-final { scan-assembler-times "xxpermdi .*,.*,.*,0" 1 } } */ |
| 18 |
/* { dg-final { scan-assembler-times "xxpermdi .*,.*,.*,1" 1 } } */ |
| 19 |
/* { dg-final { scan-assembler-times "xxpermdi .*,.*,.*,2" 1 } } */ |
| 20 |
/* { dg-final { scan-assembler-times "xxpermdi .*,.*,.*,3" 1 } } */ |