blob: ae465036584fe81d581aa2667163d3bba0a20831 [file] [log] [blame]
Tanya Lattnerb46665e2008-03-18 03:45:45 +00001; RUN: llvm-as < %s | opt -simplifycfg -instcombine \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002; RUN: -simplifycfg | llvm-dis | not grep call
3
Tanya Lattnerb46665e2008-03-18 03:45:45 +00004declare void @bar()
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005
Tanya Lattnerb46665e2008-03-18 03:45:45 +00006define void @test(i32 %X, i32 %Y) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007entry:
Tanya Lattnerb46665e2008-03-18 03:45:45 +00008 %tmp.2 = icmp ne i32 %X, %Y ; <i1> [#uses=1]
9 br i1 %tmp.2, label %shortcirc_next, label %UnifiedReturnBlock
10shortcirc_next: ; preds = %entry
11 %tmp.3 = icmp ne i32 %X, %Y ; <i1> [#uses=1]
12 br i1 %tmp.3, label %UnifiedReturnBlock, label %then
13then: ; preds = %shortcirc_next
14 call void @bar( )
Dan Gohmanf17a25c2007-07-18 16:29:46 +000015 ret void
Tanya Lattnerb46665e2008-03-18 03:45:45 +000016UnifiedReturnBlock: ; preds = %shortcirc_next, %entry
17 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000018}
19