2002-05-06 02:37:38 +00:00
|
|
|
; Test CFG simplify removal of branch instructions...
|
|
|
|
;
|
2009-09-11 17:02:12 +00:00
|
|
|
; RUN: opt < %s -simplifycfg -S | 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
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-10-30 22:39:36 +00:00
|
|
|
define void @test4() {
|
|
|
|
entry:
|
|
|
|
br label %return
|
|
|
|
return:
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
@test4g = global i8* blockaddress(@test4, %return)
|