1 /* { dg-require-effective-target vect_int } */
15 static int a[N] = {1,2,3,4,5,6,7,8,9};
16 static int b[N] = {2,3,4,5,6,7,8,9,0};
18 __attribute__ ((noinline))
23 p = (struct extraction *) malloc (sizeof (struct extraction));
25 /* Vectorizable: alias analysis determines that p can't point to a and/or b. */
26 for (i = 0; i < N; i++)
33 for (i = 0; i < N; i++)
35 if (p->a[i] != a[i] || p->b[i] != b[i])
42 __attribute__ ((noinline))
45 int c[N] = {1,2,3,4,5,6,7,8,9};
46 int d[N] = {2,3,4,5,6,7,8,9,0};
48 p = (struct extraction *) malloc (sizeof (struct extraction));
50 /* Vectorizable: c and d are local arrays. */
51 for (i = 0; i < N; i++)
58 for (i = 0; i < N; i++)
60 if (p->a[i] != c[i] || p->b[i] != d[i])
77 /* Requires versioning. */
78 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 0 "vect" } } */
79 /* { dg-final { cleanup-tree-dump "vect" } } */