2009-09-11 17:02:12 +00:00
|
|
|
; RUN: opt < %s -simplifycfg -S | not grep br
|
2004-04-09 23:50:29 +00:00
|
|
|
|
2011-04-29 18:47:25 +00:00
|
|
|
define i32 @test(i1 %C, i32 %V1, i32 %V2, i16 %V3) {
|
2004-04-09 23:50:29 +00:00
|
|
|
entry:
|
2011-04-29 18:47:25 +00:00
|
|
|
br i1 %C, label %then, label %else
|
2008-03-18 03:45:45 +00:00
|
|
|
then: ; preds = %entry
|
2011-04-29 18:47:25 +00:00
|
|
|
%V4 = or i32 %V2, %V1 ; <i32> [#uses=1]
|
2004-04-09 23:50:29 +00:00
|
|
|
br label %Cont
|
2011-04-29 18:47:25 +00:00
|
|
|
else: ; preds = %entry
|
|
|
|
%V5 = sext i16 %V3 to i32 ; <i32> [#uses=1]
|
|
|
|
br label %Cont
|
|
|
|
Cont: ; preds = %then, %else
|
|
|
|
%V6 = phi i32 [ %V5, %else ], [ %V4, %then ] ; <i32> [#uses=0]
|
|
|
|
call i32 @test( i1 false, i32 0, i32 0, i16 0 ) ; <i32>:0 [#uses=0]
|
2008-03-18 03:45:45 +00:00
|
|
|
ret i32 %V1
|
2004-04-09 23:50:29 +00:00
|
|
|
}
|
|
|
|
|