blob: afe5b352eebe2a998fc561d5ba5ccdb84da74aba [file] [log] [blame]
Dan Gohman5bb7c7c2009-09-08 22:34:10 +00001; RUN: opt %s -condprop -S | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002; RUN: not grep {br label}
Dan Gohman5bb7c7c2009-09-08 22:34:10 +00003; RUN: opt %s -condprop -S | not grep T2
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00005
6define i32 @test(i1 %C) {
7 br i1 %C, label %T1, label %F1
8
9T1: ; preds = %0
10 br label %Cont
11
12F1: ; preds = %0
13 br label %Cont
14
15Cont: ; preds = %F1, %T1
16 %C2 = phi i1 [ false, %F1 ], [ true, %T1 ] ; <i1> [#uses=1]
17 br i1 %C2, label %T2, label %F2
18
19T2: ; preds = %Cont
20 call void @bar( )
21 ret i32 17
22
23F2: ; preds = %Cont
24 ret i32 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +000025}
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000026
27declare void @bar()
28