PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-27.c
blob590217feee79c958999687239315c9ca4977a1bd
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 /* unaligned load. */
11 int ia[N];
12 int ib[N+1];
14 __attribute__ ((noinline))
15 int main1 ()
17 int i;
19 for (i=0; i <= N; i++)
21 ib[i] = i;
24 for (i = 1; i <= N; i++)
26 ia[i-1] = ib[i];
29 /* check results: */
30 for (i = 1; i <= N; i++)
32 if (ia[i-1] != ib[i])
33 abort ();
36 return 0;
39 int main (void)
41 check_vect ();
43 return main1 ();
46 /* The initialization induction loop (with aligned access) is also vectorized. */
47 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
48 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { 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" } } */