7b449965496510b35f52cb40ff97b3e9448442cb
[oota-llvm.git] / test / Transforms / SimplifyCFG / 2004-12-10-SimplifyCFGCrash.ll
1 ; RUN: llvm-as < %s | opt -simplifycfg -disable-output
2
3 implementation   ; Functions:
4
5 void %symhash_add() {
6 entry:
7         br bool undef, label %then.0, label %UnifiedReturnBlock
8
9 then.0:         ; preds = %entry
10         br bool undef, label %loopentry.2, label %loopentry.1.preheader
11
12 loopentry.1.preheader:          ; preds = %then.0
13         br label %loopentry.1.outer
14
15 loopentry.1.outer:              ; preds = %loopentry.1.preheader, %loopexit.1
16         br label %loopentry.1
17
18 loopentry.1:            ; preds = %loopentry.1.outer, %then.1, %then.3, %then.4, %endif.1
19         br bool undef, label %loopexit.1, label %no_exit.1
20
21 no_exit.1:              ; preds = %loopentry.1
22         br bool undef, label %then.1, label %else.0
23
24 then.1:         ; preds = %no_exit.1
25         br label %loopentry.1
26
27 else.0:         ; preds = %no_exit.1
28         br bool undef, label %then.2, label %else.1
29
30 then.2:         ; preds = %else.0
31         br bool undef, label %then.3, label %endif.1
32
33 then.3:         ; preds = %then.2
34         br label %loopentry.1
35
36 else.1:         ; preds = %else.0
37         br bool undef, label %endif.1, label %then.4
38
39 then.4:         ; preds = %else.1
40         br label %loopentry.1
41
42 endif.1:                ; preds = %then.2, %else.1
43         br label %loopentry.1
44
45 loopexit.1:             ; preds = %loopentry.1
46         br bool undef, label %loopentry.1.outer, label %loopentry.2
47
48 loopentry.2:            ; preds = %then.0, %loopexit.1, %no_exit.2
49         br bool undef, label %loopexit.2, label %no_exit.2
50
51 no_exit.2:              ; preds = %loopentry.2
52         br label %loopentry.2
53
54 loopexit.2:             ; preds = %loopentry.2
55         ret void
56
57 UnifiedReturnBlock:             ; preds = %entry
58         ret void
59 }