Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / vect / vect-peel-4.c
blob8ed0c6f0807aa0599b6bfa2ad0d4440c86a4368e
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 128
8 int ib[N+7];
10 __attribute__ ((noinline))
11 int main1 ()
13 int i;
14 int ia[N+1];
16 /* Don't peel keeping one load and the store aligned. */
17 for (i = 0; i <= N; i++)
19 ia[i] = ib[i] + ib[i+6];
22 /* check results: */
23 for (i = 1; i <= N; i++)
25 if (ia[i] != ib[i] + ib[i+6])
26 abort ();
29 return 0;
32 int main (void)
34 int i;
36 check_vect ();
38 for (i = 0; i <= N+6; i++)
39 ib[i] = i;
41 return main1 ();
44 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
45 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
46 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
47 /* { dg-final { cleanup-tree-dump "vect" } } */