1 ; Mem2reg used to only add one incoming value to a PHI node, even if it had
2 ; multiple incoming edges from a block.
4 ; RUN: opt < %s -passes=mem2reg -disable-output
6 define i32 @test(i1 %c1, i1 %c2) {
7 %X = alloca i32 ; <ptr> [#uses=2]
8 br i1 %c1, label %Exit, label %B2
11 br i1 %c2, label %Exit, label %Exit
12 Exit: ; preds = %B2, %B2, %0
13 %Y = load i32, ptr %X ; <i32> [#uses=1]