1 /* { dg-require-effective-target vect_int } */
2 
3 #include <stdarg.h>
4 #include "tree-vect.h"
5 
6 #define N 16
7 
main1()8 __attribute__ ((noinline)) int main1 ()
9 {
10   int arr1[N];
11   int arr2[N];
12   int k = 0;
13   int m = 3, i = 0;
14 
15   /* vectorization of induction.
16      Peeling to align the store is also applied.  */
17 
18    do {
19         k = k + 2;
20         arr1[i] = k;
21 	m = k + 3;
22 	arr2[i] = m;
23 	i++;
24    } while (i < N);
25 
26   /* check results:  */
27   for (i = 0; i < N; i++)
28     {
29       if (arr1[i] != 2+2*i || arr2[i] != 5 + 2*i)
30         abort ();
31     }
32 
33   return 0;
34 }
35 
main(void)36 int main (void)
37 {
38   check_vect ();
39 
40   return main1 ();
41 }
42 
43 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
44