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

void
f (int *restrict y, int *restrict x, int *restrict indices, int *restrict cond, int n)
{
  for (int i = 0; i < n; ++i)
    {
      if (cond[i * 2])
	y[i * 2] = x[indices[i * 2]] + 1;
      if (cond[i * 2 + 1])
	y[i * 2 + 1] = x[indices[i * 2 + 1]] + 2;
    }
}

/* { dg-final { scan-tree-dump "Loop contains only SLP stmts" vect { target vect_gather_load_ifn } } } */