blob: f1da1ba1624d14d6919544d26c5ac1afbb229571 [file] [log] [blame]
Dan Gohmanb1e1e822009-09-08 16:50:01 +00001; RUN: opt %s -simplifycfg -instcombine \
Reid Spencer9aafdcf2007-04-15 09:21:47 +00002; RUN: -simplifycfg | llvm-dis | not grep call
Chris Lattner470221c2004-05-01 23:35:21 +00003
Tanya Lattnerf04d8d12008-03-18 03:45:45 +00004declare void @bar()
Chris Lattner470221c2004-05-01 23:35:21 +00005
Tanya Lattnerf04d8d12008-03-18 03:45:45 +00006define void @test(i32 %X, i32 %Y) {
Chris Lattner470221c2004-05-01 23:35:21 +00007entry:
Tanya Lattnerf04d8d12008-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 Lattner470221c2004-05-01 23:35:21 +000015 ret void
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000016UnifiedReturnBlock: ; preds = %shortcirc_next, %entry
17 ret void
Chris Lattner470221c2004-05-01 23:35:21 +000018}
19