| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-additional-options "-mvsx" } */ |
| 3 |
/* { dg-require-effective-target vect_int } */ |
| 4 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 5 |
|
| 6 |
/* Verify we do cost the required vec_perm. */ |
| 7 |
|
| 8 |
int x[1024], y[1024]; |
| 9 |
|
| 10 |
void |
| 11 |
foo () |
| 12 |
{ |
| 13 |
for (int i = 0; i < 512; ++i) |
| 14 |
{ |
| 15 |
x[2 * i] = y[1023 - (2 * i)]; |
| 16 |
x[2 * i + 1] = y[1023 - (2 * i + 1)]; |
| 17 |
} |
| 18 |
} |
| 19 |
/* The reason why it doesn't check the exact count is that |
| 20 |
retrying for the epilogue with partial vector capability |
| 21 |
like Power10 can result in more than 1 vec_perm. */ |
| 22 |
/* { dg-final { scan-tree-dump {\mvec_perm\M} "vect" } } */ |