gcc/testsuite/gcc.dg/autopar/parloops-exit-first-loop-alt-3.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -ftree-parallelize-loops=2 -fdump-tree-parloops2-details" } */ |
| 3 | |
| 4 | /* Variable bound, reduction. */ |
| 5 | |
| 6 | unsigned int *a; |
| 7 | |
| 8 | unsigned int |
| 9 | f (unsigned int n, unsigned int *__restrict__ a) |
| 10 | { |
| 11 | int i; |
| 12 | unsigned int sum = 1; |
| 13 | |
| 14 | for (i = 0; i < n; ++i) |
| 15 | sum += a[i]; |
| 16 | |
| 17 | return sum; |
| 18 | } |
| 19 | |
| 20 | /* { dg-final { scan-tree-dump-times "alternative exit-first loop transform succeeded" 1 "parloops2" } } */ |