Merge branches/gcc-4_9-branch rev 225109.
[official-gcc.git] / gcc-4_9-branch / gcc / testsuite / gcc.dg / vect / vect-peel-4.c
blob53871c8833fdd471550d72ea9141a19f1dad0c81
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];
9 int ia[N+1];
11 __attribute__ ((noinline))
12 int main1 ()
14 int i;
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+5];
22 /* check results: */
23 for (i = 1; i <= N; i++)
25 if (ia[i] != ib[i] + ib[i+5])
26 abort ();
29 return 0;
32 int main (void)
34 int i;
36 check_vect ();
38 for (i = 0; i <= N+6; i++)
40 asm volatile ("" : "+r" (i));
41 ib[i] = i;
44 return main1 ();
47 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { 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" } } */