blob: 448934e725081cce2d2785821b02df9bcbdb8c9e [file] [log] [blame]
Dan Gohmanf2f6ce62009-09-11 18:01:28 +00001; RUN: opt < %s -simplifycfg -S | not grep call
Chris Lattnerbe8d1702004-05-01 22:36:24 +00002
Tanya Lattnerf04d8d12008-03-18 03:45:45 +00003declare void @bar()
Chris Lattnerbe8d1702004-05-01 22:36:24 +00004
Tanya Lattnerf04d8d12008-03-18 03:45:45 +00005define void @test(i32 %X, i32 %Y) {
Chris Lattnerbe8d1702004-05-01 22:36:24 +00006entry:
Tanya Lattnerf04d8d12008-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
Chris Lattnerbe8d1702004-05-01 22:36:24 +00009shortcirc_next: ; preds = %entry
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000010 br i1 %tmp.2, label %UnifiedReturnBlock, label %then
Chris Lattnerbe8d1702004-05-01 22:36:24 +000011then: ; preds = %shortcirc_next
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000012 call void @bar( )
Chris Lattnerbe8d1702004-05-01 22:36:24 +000013 ret void
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000014UnifiedReturnBlock: ; preds = %shortcirc_next, %entry
15 ret void
Chris Lattnerbe8d1702004-05-01 22:36:24 +000016}
17