gcc/testsuite/gcc.dg/vect/pr68482.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-require-effective-target vect_int } */ |
| 3 | |
| 4 | void test(int* input, int* out, unsigned x1, unsigned x2) |
| 5 | { |
| 6 | unsigned i, j; |
| 7 | unsigned end = x1; |
| 8 | |
| 9 | for(i = j = 0; i < 1000; i++) { |
| 10 | int sum = 0; |
| 11 | end += x2; |
| 12 | for( ; j < end; j++) |
| 13 | sum += input[j]; |
| 14 | out[i] = sum; |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */ |