blob: 814c2a85d10b36448e1eb5349cdf4bc1394bc54e [file] [log] [blame]
Dan Gohman1b4c27772009-09-08 16:50:01 +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