gcc/testsuite/gcc.dg/tree-ssa/split-path-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fsplit-paths -fdump-tree-split-paths-details " } */ |
| 3 | |
| 4 | int |
| 5 | foo(signed char *p, int n) |
| 6 | { |
| 7 | int s = 0; |
| 8 | int i; |
| 9 | |
| 10 | for (i = 0; i < n; i++) { |
| 11 | if (p[i] >= 0) |
| 12 | s++; |
| 13 | else |
| 14 | s--; |
| 15 | } |
| 16 | |
| 17 | return s; |
| 18 | } |
| 19 | |
| 20 | /* { dg-final { scan-tree-dump "appears to be a join point for if-convertable" "split-paths" } } */ |
| 21 |