(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
pr65930-2.c
       1  /* { dg-require-effective-target vect_int } */
       2  
       3  #include "tree-vect.h"
       4  
       5  int __attribute__((noipa))
       6  bar (unsigned int *x, int n)
       7  {
       8    int sum = 4;
       9    x = __builtin_assume_aligned (x, __BIGGEST_ALIGNMENT__);
      10    for (int i = 0; i < n; ++i)
      11      sum += x[i*4+0]+ x[i*4 + 1] + x[i*4 + 2] + x[i*4 + 3];
      12    return sum;
      13  }
      14  
      15  int
      16  main ()
      17  {
      18    static int a[16] __attribute__((aligned(__BIGGEST_ALIGNMENT__)))
      19      = { 1, 3, 5, 8, 9, 10, 17, 18, 23, 29, 30, 55, 42, 2, 3, 1 };
      20    check_vect ();
      21    if (bar (a, 4) != 260)
      22      abort ();
      23    return 0;
      24  }
      25  
      26  /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */
      27  /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" } } */
      28  /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */