111
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-O2 -fdump-tree-thread1-stats -fdump-tree-dom2-stats -fdisable-tree-ethread" } */
|
|
3
|
|
4 void foo();
|
|
5 void bla();
|
|
6
|
|
7 /* In the following case, we should be able to thread edge through
|
|
8 the loop header. */
|
|
9
|
|
10 void thread_latch_through_header (void)
|
|
11 {
|
|
12 int i = 0;
|
|
13 int first = 1;
|
|
14
|
|
15 do
|
|
16 {
|
|
17 if (first)
|
|
18 foo ();
|
|
19
|
|
20 first = 0;
|
|
21 bla ();
|
|
22 } while (i++ < 100);
|
|
23 }
|
|
24
|
|
25 /* Threading the latch to a later point in the loop is safe in this
|
|
26 case. And we want to thread through the header as well. These
|
|
27 are both caught by threading in DOM. */
|
|
28 /* { dg-final { scan-tree-dump-not "Jumps threaded" "dom2"} } */
|
|
29 /* { dg-final { scan-tree-dump-times "Jumps threaded: 1" 1 "thread1"} } */
|