1  /* { dg-require-effective-target vect_int } */
       2  
       3  #include "tree-vect.h"
       4  
       5  struct {
       6      int x_advance;
       7      int y_advance;
       8  } a[256];
       9  
      10  int b, c;
      11  
      12  void __attribute__((noinline,noclone)) fn1()
      13  {
      14    for (int i = 0; i < 256; i++)
      15      {
      16        c -= a[i].x_advance;
      17        b -= a[i].y_advance;
      18      }
      19  }
      20  
      21  int main()
      22  {
      23    check_vect ();
      24  
      25    for (int i = 0; i < 256; ++i)
      26      {
      27        a[i].x_advance = i;
      28        a[i].y_advance = -i + 3;
      29        __asm__ volatile ("" : : : "memory");
      30      }
      31    
      32    fn1();
      33  
      34    if (c != -32640 || b != 31872)
      35      abort ();
      36  
      37    return 0;
      38  }
      39  
      40  /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */
      41  /* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 0 "vect" } } */