blob: a28dfb3d70ec692a34230232e3c6d18f3d9c4df2 [file] [log] [blame]
Chris Lattner13d38cd2001-11-26 19:16:37 +00001implementation
2
3;; This is an irreducible flow graph
4
5
6void "irreducible"(bool %cond)
7begin
8 br bool %cond, label %X, label %Y
9
10X:
11 br label %Y
12Y:
13 br label %X
14end
15
16;; This is a pair of loops that share the same header
17
18void "sharedheader"(bool %cond)
19begin
20 br label %A
21A:
22 br bool %cond, label %X, label %Y
23
24X:
25 br label %A
26Y:
27 br label %A
28end
29
30;; This is a simple nested loop
31void "nested"(bool %cond1, bool %cond2, bool %cond3)
32begin
33 br label %Loop1
34
35Loop1:
36 br label %Loop2
37
38Loop2:
39 br label %Loop3
40
41Loop3:
42 br bool %cond3, label %Loop3, label %L3Exit
43
44L3Exit:
45 br bool %cond2, label %Loop2, label %L2Exit
46
47L2Exit:
48 br bool %cond1, label %Loop1, label %L1Exit
49
50L1Exit:
51 ret void
52end
53