1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize" } */
3 
4 int
reduc(int * restrict a,int * restrict b,int * restrict c)5 reduc (int *restrict a, int *restrict b, int *restrict c)
6 {
7   for (int i = 0; i < 100; ++i)
8     {
9       int res = 0;
10       for (int j = 0; j < 100; ++j)
11 	if (b[i + j] != 0)
12 	  res = c[i + j];
13       a[i] = res;
14     }
15 }
16 
17 /* { dg-final { scan-assembler-times {\tcmpne\tp[0-9]+\.s, } 1 } } */
18 /* { dg-final { scan-assembler-not {\tcmpeq\tp[0-9]+\.s, } } } */
19 /* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.s, } 1 } } */
20