blob: f73e01ca47671d761a979b9d898a46f480277963 [file] [log] [blame]
Dan Gohmanf2f6ce62009-09-11 18:01:28 +00001; RUN: opt < %s -simplifycfg -instcombine \
Dan Gohman7c1a96c2009-09-08 22:41:33 +00002; RUN: -simplifycfg -S | 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