Merge branches/gcc-4_9-branch rev 225109.
[official-gcc.git] / gcc-4_9-branch / gcc / testsuite / gcc.dg / vect / vect-27.c
blob36c23fa5cc66ed6ef413df6a94f5d487866015b9
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 128
8 /* unaligned load. */
10 int ia[N];
11 int ib[N+1];
13 __attribute__ ((noinline))
14 int main1 ()
16 int i;
18 for (i=0; i <= N; i++)
20 ib[i] = i;
23 for (i = 1; i <= N; i++)
25 ia[i-1] = ib[i];
28 /* check results: */
29 for (i = 1; i <= N; i++)
31 if (ia[i-1] != ib[i])
32 abort ();
35 return 0;
38 int main (void)
40 check_vect ();
42 return main1 ();
45 /* The initialization induction loop (with aligned access) is also vectorized. */
46 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
47 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
48 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
49 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
50 /* { dg-final { cleanup-tree-dump "vect" } } */