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

#define N 16

struct s { int x[N]; };

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

/* { dg-final { scan-tree-dump {checking that [^\n]* and [^\n]* have different addresses} "vect" } } */
/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { vect_perm && vect_element_align } } } } */