blob: f73e01ca47671d761a979b9d898a46f480277963 [file] [log] [blame]
Dan Gohman3c7d3082009-09-11 18:01:28 +00001; RUN: opt < %s -simplifycfg -instcombine \
Dan Gohmanf15d0652009-09-08 22:41:33 +00002; RUN: -simplifycfg -S | not grep call
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
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