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 unsigned int arr1[N]; 11 unsigned short arr2[N]; 12 unsigned int k = 0; 13 unsigned short m = 3; 14 int i = 0; 15 16 /* Vectorization of induction with multiple data types. */ 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)36int main (void) 37 { 38 check_vect (); 39 40 return main1 (); 41 } 42 43 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_pack_trunc } } } */ 44