Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-78.c
blobd44c4979205fda204a29b85faea6661df6d586f4
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 8
7 #define OFF 8
9 typedef int aint __attribute__ ((__aligned__(16)));
11 aint ib[N+OFF] = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10, 14, 22, 26, 34};
12 int off = 8;
14 int main1 (aint *ib)
16 int i;
17 int ia[N];
19 for (i = 0; i < N; i++)
21 ia[i] = ib[i+off];
25 /* check results: */
26 for (i = 0; i < N; i++)
28 if (ia[i] != ib[i+off])
29 abort ();
32 return 0;
35 int main (void)
37 check_vect ();
39 main1 (ib);
40 return 0;
43 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { lp64 || vect_no_align } } } } */
44 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { lp64 || vect_no_align } } } } */
45 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */