if basic blocks are destroyed while there are *just* BlockAddress' hanging
[oota-llvm.git] / test / Transforms / SimplifyCFG / basictest.ll
1 ; Test CFG simplify removal of branch instructions...
2 ;
3 ; RUN: opt < %s -simplifycfg -S | not grep br
4
5 define void @test1() {
6         br label %BB1
7 BB1:            ; preds = %0
8         ret void
9 }
10
11 define void @test2() {
12         ret void
13 BB1:            ; No predecessors!
14         ret void
15 }
16
17 define void @test3(i1 %T) {
18         br i1 %T, label %BB1, label %BB1
19 BB1:            ; preds = %0, %0
20         ret void
21 }
22
23
24 define void @test4() {
25 entry:
26  br label %return
27 return:
28  ret void
29 }
30 @test4g = global i8* blockaddress(@test4, %return)