blob: f73e01ca47671d761a979b9d898a46f480277963 [file] [log] [blame]
Dan Gohman18800922009-09-11 18:01:28 +00001; RUN: opt < %s -simplifycfg -instcombine \
Dan Gohman4f2527c2009-09-08 22:41:33 +00002; RUN: -simplifycfg -S | not grep call
Chris Lattnerc9b34e52004-05-01 23:35:21 +00003
Tanya Lattnerbaa370b2008-03-18 03:45:45 +00004declare void @bar()
Chris Lattnerc9b34e52004-05-01 23:35:21 +00005
Tanya Lattnerbaa370b2008-03-18 03:45:45 +00006define void @test(i32 %X, i32 %Y) {
Chris Lattnerc9b34e52004-05-01 23:35:21 +00007entry:
Tanya Lattnerbaa370b2008-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( )
Chris Lattnerc9b34e52004-05-01 23:35:21 +000015 ret void
Tanya Lattnerbaa370b2008-03-18 03:45:45 +000016UnifiedReturnBlock: ; preds = %shortcirc_next, %entry
17 ret void
Chris Lattnerc9b34e52004-05-01 23:35:21 +000018}
19