(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
bb-slp-59.c
       1  /* { dg-do compile } */
       2  /* { dg-require-effective-target vect_double } */
       3  /* { dg-additional-options "-fdump-tree-loopdone" } */
       4  
       5  double x[1024];
       6  void bar (void);
       7  
       8  void foo (void)
       9  {
      10    double tem1 = x[0];
      11    double tem2 = x[1];
      12    for (int i = 0; i < 511; ++i)
      13      {
      14        x[2*i] = tem2;
      15        x[2*i+1] = tem1;
      16        bar ();
      17        tem1 = x[2*(i+1)];
      18        tem2 = x[2*(i+1)+1];
      19      }
      20  }
      21  
      22  /* We should be able to vectorize the cycle in one SLP attempt including
      23     both load groups and do only one permutation.  */
      24  /* { dg-final { scan-tree-dump-times "transform load" 2 "slp1" } } */
      25  /* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 1 "loopdone" } } */
      26  /* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "slp1" } } */