1 /* { dg-require-effective-target vect_float } */
2 /* { dg-add-options bind_pic_locally } */
3 
4 #include <stdarg.h>
5 #include "tree-vect.h"
6 
7 #define N 16
8 
9 float a[N];
10 float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
11 float d[N] = {0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30};
12 
13 __attribute__ ((noinline))
main1()14 int main1 ()
15 {
16   int i, j;
17 
18   i = 0;
19   j = 0;
20   while (i < 5*N)
21     {
22       a[j] = c[j];
23       i += 5;
24       j++;
25     }
26 
27   /* check results:  */
28   for (i = 0; i <N; i++)
29     {
30       if (a[i] != c[i])
31         abort ();
32     }
33 
34 
35   for (i = N; i > 0; i--)
36     {
37       a[N-i] = d[N-i];
38     }
39 
40   /* check results:  */
41   for (i = 0; i < N; i++)
42     {
43       if (a[i] != d[i])
44         abort ();
45     }
46 
47   return 0;
48 }
49 
main(void)50 int main (void)
51 {
52   check_vect ();
53 
54   return main1 ();
55 }
56 
57 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
58 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
59