PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-peel-4.c
blob88f9f0ddcbab55b84e619d9fb2086e093be95820
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
9 int ib[N+7];
10 int ia[N+1];
12 __attribute__ ((noinline))
13 int main1 ()
15 int i;
17 /* Don't peel keeping one load and the store aligned. */
18 for (i = 0; i <= N; i++)
20 ia[i] = ib[i] + ib[i+5];
23 /* check results: */
24 for (i = 1; i <= N; i++)
26 if (ia[i] != ib[i] + ib[i+5])
27 abort ();
30 return 0;
33 int main (void)
35 int i;
37 check_vect ();
39 for (i = 0; i <= N+6; i++)
41 asm volatile ("" : "+r" (i));
42 ib[i] = i;
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_unaligned_possible } } } } */
50 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */