summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c
blob: bfa946b9ad2bceab4971068d2f43596fe041ed1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */

/* Intended to be larger than any VF.  */
#define GAP 128
#define N (GAP * 3)

struct s { int x[N]; };

void
f1 (struct s *a, struct s *b)
{
  for (int i = 0; i < GAP * 2; ++i)
    a->x[i + GAP] += b->x[i];
}

/* { dg-final { scan-tree-dump-times "consider run-time aliasing" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "improved number of alias checks from 1 to 0" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 1 "vect" } } */