1; RUN: opt < %s -adce -simplifycfg | llvm-dis
2; RUN: opt < %s -passes=adce | llvm-dis
3
4define i32 @Test(i32 %A, i32 %B) {
5BB1:
6        br label %BB4
7
8BB2:            ; No predecessors!
9        br label %BB3
10
11BB3:            ; preds = %BB4, %BB2
12        %ret = phi i32 [ %X, %BB4 ], [ %B, %BB2 ]               ; <i32> [#uses=1]
13        ret i32 %ret
14
15BB4:            ; preds = %BB1
16        %X = phi i32 [ %A, %BB1 ]               ; <i32> [#uses=1]
17        br label %BB3
18}
19