[gcc]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / swaps-p8-19.c
blob6dffbb9b8925bef3907ec6670770d2d018c962b6
1 /* { dg-do compile { target { powerpc64le-*-* } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
3 /* { dg-options "-O2 -ftree-vectorize -mcpu=power8 -ffast-math -fvect-cost-model=unlimited" } */
5 /* This tests special handling for various uses of xxpermdi, other than
6 to perform doubleword swaps. */
8 void foo (_Complex double *self, _Complex double *a, _Complex double *b,
9 int a1, int a2)
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];
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 } } */