2009-09-12 02:01:28 +08:00
|
|
|
; RUN: opt < %s -simplifycfg -instcombine \
|
2009-09-09 06:41:33 +08:00
|
|
|
; RUN: -simplifycfg -S | not grep call
|
2004-05-02 07:35:21 +08:00
|
|
|
|
2008-03-18 11:45:45 +08:00
|
|
|
declare void @bar()
|
2004-05-02 07:35:21 +08:00
|
|
|
|
2008-03-18 11:45:45 +08:00
|
|
|
define void @test(i32 %X, i32 %Y) {
|
2004-05-02 07:35:21 +08:00
|
|
|
entry:
|
2008-03-18 11:45:45 +08:00
|
|
|
%tmp.2 = icmp ne i32 %X, %Y ; <i1> [#uses=1]
|
|
|
|
br i1 %tmp.2, label %shortcirc_next, label %UnifiedReturnBlock
|
|
|
|
shortcirc_next: ; preds = %entry
|
|
|
|
%tmp.3 = icmp ne i32 %X, %Y ; <i1> [#uses=1]
|
|
|
|
br i1 %tmp.3, label %UnifiedReturnBlock, label %then
|
|
|
|
then: ; preds = %shortcirc_next
|
|
|
|
call void @bar( )
|
|
|
|
ret void
|
|
|
|
UnifiedReturnBlock: ; preds = %shortcirc_next, %entry
|
2004-05-02 07:35:21 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|