blob: 448934e725081cce2d2785821b02df9bcbdb8c9e [file] [log] [blame]
Dan Gohman3c7d3082009-09-11 18:01:28 +00001; RUN: opt < %s -simplifycfg -S | not grep call
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Tanya Lattnerb46665e2008-03-18 03:45:45 +00003declare void @bar()
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
Tanya Lattnerb46665e2008-03-18 03:45:45 +00005define void @test(i32 %X, i32 %Y) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00006entry:
Tanya Lattnerb46665e2008-03-18 03:45:45 +00007 %tmp.2 = icmp slt i32 %X, %Y ; <i1> [#uses=2]
8 br i1 %tmp.2, label %shortcirc_next, label %UnifiedReturnBlock
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009shortcirc_next: ; preds = %entry
Tanya Lattnerb46665e2008-03-18 03:45:45 +000010 br i1 %tmp.2, label %UnifiedReturnBlock, label %then
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011then: ; preds = %shortcirc_next
Tanya Lattnerb46665e2008-03-18 03:45:45 +000012 call void @bar( )
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013 ret void
Tanya Lattnerb46665e2008-03-18 03:45:45 +000014UnifiedReturnBlock: ; preds = %shortcirc_next, %entry
15 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016}
17