1 ; RUN: opt < %s -argpromotion -mem2reg -S | not grep alloca
2 define internal i32 @test(i32* %X, i32* %Y) {
3 %A = load i32* %X ; <i32> [#uses=1]
4 %B = load i32* %Y ; <i32> [#uses=1]
5 %C = add i32 %A, %B ; <i32> [#uses=1]
9 define internal i32 @caller(i32* %B) {
10 %A = alloca i32 ; <i32*> [#uses=2]
12 %C = call i32 @test( i32* %A, i32* %B ) ; <i32> [#uses=1]
16 define i32 @callercaller() {
17 %B = alloca i32 ; <i32*> [#uses=2]
19 %X = call i32 @caller( i32* %B ) ; <i32> [#uses=1]