Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-77.c
blob43a6999a148c64bc96a76a88adb556c1d8132af2
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};
13 int main1 (aint *ib, int off)
15 int i;
16 int ia[N];
18 for (i = 0; i < N; i++)
20 ia[i] = ib[i+off];
24 /* check results: */
25 for (i = 0; i < N; i++)
27 if (ia[i] != ib[i+off])
28 abort ();
31 return 0;
34 int main (void)
36 check_vect ();
38 main1 (ib, 8);
39 return 0;
42 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { lp64 || vect_no_align } } } } */
43 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { lp64 || vect_no_align } } } } */
44 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */