blob: 0b3893d520dbb8eeef70e6530367bb40938cb0e1 [file] [log] [blame]
Chris Lattner50b95752009-09-11 17:02:12 +00001; RUN: opt < %s -simplifycfg -S | not grep br
Chris Lattner4f21c172004-04-09 23:50:29 +00002
Peter Collingbourne8a701922011-04-29 18:47:25 +00003define i32 @test(i1 %C, i32 %V1, i32 %V2, i16 %V3) {
Chris Lattner4f21c172004-04-09 23:50:29 +00004entry:
Peter Collingbourne8a701922011-04-29 18:47:25 +00005 br i1 %C, label %then, label %else
Tanya Lattnerf04d8d12008-03-18 03:45:45 +00006then: ; preds = %entry
Peter Collingbourne8a701922011-04-29 18:47:25 +00007 %V4 = or i32 %V2, %V1 ; <i32> [#uses=1]
Chris Lattner4f21c172004-04-09 23:50:29 +00008 br label %Cont
Peter Collingbourne8a701922011-04-29 18:47:25 +00009else: ; preds = %entry
10 %V5 = sext i16 %V3 to i32 ; <i32> [#uses=1]
11 br label %Cont
12Cont: ; preds = %then, %else
13 %V6 = phi i32 [ %V5, %else ], [ %V4, %then ] ; <i32> [#uses=0]
14 call i32 @test( i1 false, i32 0, i32 0, i16 0 ) ; <i32>:0 [#uses=0]
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000015 ret i32 %V1
Chris Lattner4f21c172004-04-09 23:50:29 +000016}
17