2002-05-06 02:37:38 +00:00
|
|
|
; Test CFG simplify removal of branch instructions...
|
|
|
|
;
|
2008-03-18 03:45:45 +00:00
|
|
|
; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br
|
2002-05-06 02:37:38 +00:00
|
|
|
|
2008-03-18 03:45:45 +00:00
|
|
|
define void @test1() {
|
|
|
|
br label %BB1
|
|
|
|
BB1: ; preds = %0
|
|
|
|
ret void
|
2002-05-06 02:37:38 +00:00
|
|
|
}
|
|
|
|
|
2008-03-18 03:45:45 +00:00
|
|
|
define void @test2() {
|
|
|
|
ret void
|
|
|
|
BB1: ; No predecessors!
|
|
|
|
ret void
|
2002-05-06 02:37:38 +00:00
|
|
|
}
|
|
|
|
|
2008-03-18 03:45:45 +00:00
|
|
|
define void @test3(i1 %T) {
|
|
|
|
br i1 %T, label %BB1, label %BB1
|
|
|
|
BB1: ; preds = %0, %0
|
|
|
|
ret void
|
2002-05-06 02:37:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-03-18 03:45:45 +00:00
|
|
|
|
|
|
|
|