blob: 814c2a85d10b36448e1eb5349cdf4bc1394bc54e [file] [log] [blame]
Dan Gohmanb1e1e822009-09-08 16:50:01 +00001; RUN: opt %s -adce -simplifycfg | llvm-dis
Chris Lattner91c93372002-05-22 19:22:45 +00002
Tanya Lattnerec9a35a2008-03-01 09:15:35 +00003define i32 @Test(i32 %A, i32 %B) {
Chris Lattner91c93372002-05-22 19:22:45 +00004BB1:
Tanya Lattnerec9a35a2008-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
Chris Lattner91c93372002-05-22 19:22:45 +000017}
Tanya Lattnerec9a35a2008-03-01 09:15:35 +000018
19