1 /* { dg-require-effective-target vect_int } */
9 static int a[N] = {1,2,3,4,5,6,7,8,9};
10 static int b[N] = {2,3,4,5,6,7,8,9,0};
12 __attribute__ ((noinline))
16 p = (unsigned int *) malloc (sizeof (unsigned int) * N);
17 q = (unsigned int *) malloc (sizeof (unsigned int) * N);
21 /* Vectorizable, before pointer plus we would get a redundant cast
22 (caused by pointer arithmetics), alias analysis fails to distinguish
23 between the pointers. */
24 for (i = 0; i < N; i++)
31 for (i = 0; i < N; i++)
33 if (*q != a[i] || *p != b[i])
42 for (i = 0; i < N; i++)
53 for (i = 0; i < N; i++)
55 if (*q != b[i] || *p != a[i])
71 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
72 /* { dg-final { cleanup-tree-dump "vect" } } */