1 /* { dg-do compile } */
2 /* { dg-require-effective-target powerpc_p8vector_ok } */
3 /* { dg-options "-O2 -ftree-vectorize -mdejagnu-cpu=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
,
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 } } */