(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
pr83857.c
       1  /* { dg-additional-options "-ffast-math" } */
       2  
       3  #define N 100
       4  
       5  double __attribute__ ((noinline, noclone))
       6  f (double *x, double y)
       7  {
       8    double a = 0;
       9    for (int i = 0; i < N; ++i)
      10      {
      11        a += y;
      12        x[i * 2] += a;
      13        x[i * 2 + 1] += a;
      14      }
      15    return a - y;
      16  }
      17  
      18  double x[N * 2];
      19  
      20  int
      21  main (void)
      22  {
      23    if (f (x, 5) != (N - 1) * 5)
      24      __builtin_abort ();
      25    return 0;
      26  }
      27  
      28  /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" { target vect_double } } } */
      29  /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { target vect_double } } } */