aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/slp-52.c
blob: ba49f0046e27e8afadf5ade0b086defeadadadc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */

void foo (int * __restrict x, int *y)
{
  for (int i = 0; i < 1024; ++i)
    {
      x[4*i+0] = y[3*i+0];
      x[4*i+1] = y[3*i+1] * 2;
      x[4*i+2] = y[3*i+2] + 3;
      x[4*i+3] = y[3*i+2] * 2 - 5;
    }
}

/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { target { vect_int && vect_int_mult } } } } */