gcc/testsuite/gcc.dg/tree-ssa/ldist-13.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-details" } */ |
| 3 | |
| 4 | float * __restrict__ x; |
| 5 | float * __restrict__ y; |
| 6 | |
| 7 | float foo (int n) |
| 8 | { |
| 9 | int i; |
| 10 | float tmp = 0.0; |
| 11 | for (i = 0; i < n; ++i) |
| 12 | { |
| 13 | x[i] = 0.0; |
| 14 | tmp += y[i]; |
| 15 | } |
| 16 | return tmp; |
| 17 | } |
| 18 | |
| 19 | /* Distributing the loop doesn't expose more parallelism. */ |
| 20 | /* { dg-final { scan-tree-dump-not "Loop 1 distributed: split to 2 loops" "ldist" } } */ |