blob: 22ff0f753bec5a79edd2d036bbe230e854789077 [file] [log] [blame]
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00001; RUN: llvm-as < %s | opt -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