Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-peel-3.c
blob8baee0d5657f30332bad807709b72fe45fe87618
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-add-options bind_pic_locally } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 128
8 #define RES 21640
10 int ib[N+10];
11 int ia[N+10];
12 int ic[N+10];
14 __attribute__ ((noinline))
15 int main1 ()
17 int i, suma = 0, sumb = 0, sumc = 0;
19 /* ib and ic have same misalignment, we peel to align them. */
20 for (i = 0; i <= N; i++)
22 suma += ia[i];
23 sumb += ib[i+5];
24 sumc += ic[i+1];
27 /* check results: */
28 if (suma + sumb + sumc != RES)
29 abort ();
31 return 0;
34 int main (void)
36 int i;
38 check_vect ();
40 for (i = 0; i < N+10; i++)
42 asm volatile ("" : "+r" (i));
43 ib[i] = i;
44 ic[i] = i+2;
45 ia[i] = i/2;
48 return main1 ();
51 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
52 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B } } } } } */
53 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B } } } } } */