blob: 1fd629a4fd41603dd496827ac8af4a96b5e8d8a2 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Test CFG simplify removal of branch instructions...
2;
Tanya Lattnerb46665e2008-03-18 03:45:45 +00003; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
Tanya Lattnerb46665e2008-03-18 03:45:45 +00005define void @test1() {
6 br label %BB1
7BB1: ; preds = %0
8 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009}
10
Tanya Lattnerb46665e2008-03-18 03:45:45 +000011define void @test2() {
12 ret void
13BB1: ; No predecessors!
14 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000015}
16
Tanya Lattnerb46665e2008-03-18 03:45:45 +000017define void @test3(i1 %T) {
18 br i1 %T, label %BB1, label %BB1
19BB1: ; preds = %0, %0
20 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000021}
22
23
Tanya Lattnerb46665e2008-03-18 03:45:45 +000024
25