gcc/testsuite/gcc.dg/tree-ssa/loop-ch-profile-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O1 -fdump-tree-ch2-blocks-details -fdump-tree-optimized-blocks-details" } */ |
| 3 | void foo (); |
| 4 | void test(int v, int q) |
| 5 | { |
| 6 | for (int i = 0; i < 10 && v/q; i++) |
| 7 | foo (); |
| 8 | } |
| 9 | /* { dg-final { scan-tree-dump-not "Invalid sum" "ch2"} } */ |
| 10 | /* dom2 optimizes out the redundant test for loop invariant v/q |
| 11 | which leads to inconsistent profile. */ |
| 12 | /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */ |