1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp1-stats -fdump-tree-dom2-stats" } */
3 
4 void foo();
5 void bla();
6 void bar();
7 
dont_thread_3(int nfirst)8 void dont_thread_3 (int nfirst)
9 {
10   int i = 0;
11   int first = 0;
12 
13   do
14     {
15       if (first)
16 	foo ();
17       else
18 	bar ();
19 
20       first = nfirst;
21       bla ();
22     } while (i++ < 100);
23 }
24 
25 /* Threading through the loop header is not safe here.  Peeling off
26    the first iteration then unswitching the loop would be safe.  */
27 /* { dg-final { scan-tree-dump-not "Jumps threaded" "vrp1"} } */
28 /* { dg-final { scan-tree-dump-not "Jumps threaded" "dom2"} } */
29