blob: 468b6ed11bc43caec85c7bc42e38e97455ee6543 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Test CFG simplify removal of branch instructions...
2;
Chris Lattner9a8e2f22009-09-11 17:02:12 +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