(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
vect-gather-2.c
       1  /* { dg-do compile } */
       2  
       3  #define N 16
       4  
       5  void
       6  f1 (int *restrict y, int *restrict x1, int *restrict x2,
       7      int *restrict indices)
       8  {
       9    for (int i = 0; i < N; ++i)
      10      {
      11        y[i * 2] = x1[indices[i * 2]] + 1;
      12        y[i * 2 + 1] = x2[indices[i * 2 + 1]] + 2;
      13      }
      14  }
      15  
      16  void
      17  f2 (int *restrict y, int *restrict x, int *restrict indices)
      18  {
      19    for (int i = 0; i < N; ++i)
      20      {
      21        y[i * 2] = x[indices[i * 2]] + 1;
      22        y[i * 2 + 1] = x[indices[i * 2 + 1] * 2] + 2;
      23      }
      24  }
      25  
      26  void
      27  f3 (int *restrict y, int *restrict x, int *restrict indices)
      28  {
      29    for (int i = 0; i < N; ++i)
      30      {
      31        y[i * 2] = x[indices[i * 2]] + 1;
      32        y[i * 2 + 1] = x[(unsigned int) indices[i * 2 + 1]] + 2;
      33      }
      34  }
      35  
      36  /* { dg-final { scan-tree-dump-not "Loop contains only SLP stmts" vect { target vect_gather_load_ifn } } } */