2009-09-12 01:02:12 +08:00
|
|
|
; RUN: opt < %s -simplifycfg -S | not grep br
|
2004-04-10 07:50:29 +08:00
|
|
|
|
2011-04-30 02:47:25 +08:00
|
|
|
define i32 @test(i1 %C, i32 %V1, i32 %V2, i16 %V3) {
|
2004-04-10 07:50:29 +08:00
|
|
|
entry:
|
2011-04-30 02:47:25 +08:00
|
|
|
br i1 %C, label %then, label %else
|
2008-03-18 11:45:45 +08:00
|
|
|
then: ; preds = %entry
|
2011-04-30 02:47:25 +08:00
|
|
|
%V4 = or i32 %V2, %V1 ; <i32> [#uses=1]
|
2004-04-10 07:50:29 +08:00
|
|
|
br label %Cont
|
2011-04-30 02:47:25 +08: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 11:45:45 +08:00
|
|
|
ret i32 %V1
|
2004-04-10 07:50:29 +08:00
|
|
|
}
|
|
|
|
|