1 /* { dg-do compile } */ 2 /* { dg-require-effective-target vect_int } */ 3 /* { dg-require-effective-target vect_condition } */ 4 5 #define N 512 6 int a[N]; foo()7int foo() 8 { 9 int i, res = 0; 10 for (i=0; i<N; i++) 11 { 12 if (a[i] != 0) 13 res += 1; 14 } 15 return res; 16 } 17 18 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ 19 20