Merge branches/gcc-4_9-branch rev 225109.
[official-gcc.git] / gcc-4_9-branch / gcc / testsuite / gcc.dg / vect / vect-72.c
blob5d23178287419f370cc6481d609137d0c92d5140
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 128
8 /* unaligned load. */
10 char ia[N];
11 char ib[N+1];
13 __attribute__ ((noinline))
14 int main1 ()
16 int i;
18 for (i=0; i < N+1; i++)
20 ib[i] = i;
21 /* Avoid vectorization. */
22 if (i%3 == 0)
23 ib[i] = 5;
26 for (i = 1; i < N+1; i++)
28 ia[i-1] = ib[i];
31 /* check results: */
32 for (i = 1; i <= N; i++)
34 if (ia[i-1] != ib[i])
35 abort ();
38 return 0;
41 int main (void)
43 check_vect ();
45 return main1 ();
48 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
49 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
50 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
51 /* { dg-final { cleanup-tree-dump "vect" } } */