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