MC/Mach-O: Update getSymbolAddress() to support evaluation of variables.
[oota-llvm.git] / test / Integer / cfgstructures_bt.ll
1 ; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
2 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3 ; RUN: diff %t1.ll %t2.ll
4
5
6 ;; This is an irreducible flow graph
7
8
9 define void @"irreducible"(i1 %cond)
10 begin
11         br i1 %cond, label %X, label %Y
12
13 X:
14         br label %Y
15 Y:
16         br label %X
17 end
18
19 ;; This is a pair of loops that share the same header
20
21 define void @"sharedheader"(i1 %cond)
22 begin
23         br label %A
24 A:
25         br i1 %cond, label %X, label %Y
26
27 X:
28         br label %A
29 Y:
30         br label %A
31 end
32
33 ;; This is a simple nested loop
34 define void @"nested"(i1 %cond1, i1 %cond2, i1 %cond3)
35 begin
36         br label %Loop1
37
38 Loop1:
39         br label %Loop2
40
41 Loop2:
42         br label %Loop3
43
44 Loop3:
45         br i1 %cond3, label %Loop3, label %L3Exit
46
47 L3Exit:
48         br i1 %cond2, label %Loop2, label %L2Exit
49
50 L2Exit:
51         br i1 %cond1, label %Loop1, label %L1Exit
52
53 L1Exit:
54         ret void
55 end
56