(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
swaps-p8-19.c
       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" } */
       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 } } */