annotate gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2c.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-vrp1-stats -fdump-tree-dom2-stats" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 void foo();
kono
parents:
diff changeset
5 void bla();
kono
parents:
diff changeset
6 void bar();
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 /* This is a TODO -- it is correct to thread both entry and latch edge through
kono
parents:
diff changeset
9 the header, but we do not handle this case yet. */
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 void dont_thread_1 (void)
kono
parents:
diff changeset
12 {
kono
parents:
diff changeset
13 int i = 0;
kono
parents:
diff changeset
14 int first = 1;
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 do
kono
parents:
diff changeset
17 {
kono
parents:
diff changeset
18 bla ();
kono
parents:
diff changeset
19 bla ();
kono
parents:
diff changeset
20 bla ();
kono
parents:
diff changeset
21 if (first)
kono
parents:
diff changeset
22 foo ();
kono
parents:
diff changeset
23 else
kono
parents:
diff changeset
24 bar ();
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 first = 0;
kono
parents:
diff changeset
27 bla ();
kono
parents:
diff changeset
28 } while (i++ < 100);
kono
parents:
diff changeset
29 }
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 /* In this case we can thread if and only if we thread through the
kono
parents:
diff changeset
32 header and around the latch. If one is done without the other, then
kono
parents:
diff changeset
33 we create an irreducible CFG. */
kono
parents:
diff changeset
34 /* { dg-final { scan-tree-dump-not "Jumps threaded" "vrp1"} } */
kono
parents:
diff changeset
35 /* { dg-final { scan-tree-dump-not "Jumps threaded" "dom2"} } */