Replace the old ADCE implementation with a new one that more simply solves
[oota-llvm.git] / test / Transforms / ArgumentPromotion / control-flow2.ll
1 ; RUN: llvm-as < %s | opt -argpromotion | llvm-dis | \
2 ; RUN:   grep {load i32\\* %A}
3
4 define internal i32 @callee(i1 %C, i32* %P) {
5         br i1 %C, label %T, label %F
6
7 T:              ; preds = %0
8         ret i32 17
9
10 F:              ; preds = %0
11         %X = load i32* %P               ; <i32> [#uses=1]
12         ret i32 %X
13 }
14
15 define i32 @foo() {
16         %A = alloca i32         ; <i32*> [#uses=2]
17         store i32 17, i32* %A
18         %X = call i32 @callee( i1 false, i32* %A )              ; <i32> [#uses=1]
19         ret i32 %X
20 }
21