blob: 378d70288f3f5992e50e3cf1c132686a93cdeb45 [file] [log] [blame]
Dan Gohman3c7d3082009-09-11 18:01:28 +00001; RUN: opt < %s -adce -simplifycfg | llvm-dis
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00003define i32 @Test(i32 %A, i32 %B) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004BB1:
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00005 br label %BB4
6
7BB2: ; No predecessors!
8 br label %BB3
9
10BB3: ; preds = %BB4, %BB2
11 %ret = phi i32 [ %X, %BB4 ], [ %B, %BB2 ] ; <i32> [#uses=1]
12 ret i32 %ret
13
14BB4: ; preds = %BB1
15 %X = phi i32 [ %A, %BB1 ] ; <i32> [#uses=1]
16 br label %BB3
Dan Gohmanf17a25c2007-07-18 16:29:46 +000017}
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000018
19