blob: 0bf5b5eed4b4f4b8fe132f26f279bc3629fa4422 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Test CFG simplify removal of branch instructions...
2;
Dan Gohman5bb7c7c2009-09-08 22:34:10 +00003; RUN: opt %s -simplifycfg -S | 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