annotate gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2b.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-options "-O2 -fdump-tree-thread1-stats -fdump-tree-dom2-stats -fdisable-tree-ethread" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 void foo();
kono
parents:
diff changeset
5 void bla();
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 /* In the following case, we should be able to thread edge through
kono
parents:
diff changeset
8 the loop header. */
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 void thread_latch_through_header (void)
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 int i = 0;
kono
parents:
diff changeset
13 int first = 1;
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 do
kono
parents:
diff changeset
16 {
kono
parents:
diff changeset
17 if (first)
kono
parents:
diff changeset
18 foo ();
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 first = 0;
kono
parents:
diff changeset
21 bla ();
kono
parents:
diff changeset
22 } while (i++ < 100);
kono
parents:
diff changeset
23 }
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 /* Threading the latch to a later point in the loop is safe in this
kono
parents:
diff changeset
26 case. And we want to thread through the header as well. These
kono
parents:
diff changeset
27 are both caught by threading in DOM. */
kono
parents:
diff changeset
28 /* { dg-final { scan-tree-dump-not "Jumps threaded" "dom2"} } */
kono
parents:
diff changeset
29 /* { dg-final { scan-tree-dump-times "Jumps threaded: 1" 1 "thread1"} } */