1; RUN: opt < %s -argpromotion 2 3declare void @llvm.gcroot(i8**, i8*) 4 5define i32 @g() { 6entry: 7 %var = alloca i32 8 store i32 1, i32* %var 9 %x = call i32 @f(i32* %var) 10 ret i32 %x 11} 12 13define internal i32 @f(i32* %xp) gc "example" { 14entry: 15 %var = alloca i8* 16 call void @llvm.gcroot(i8** %var, i8* null) 17 %x = load i32, i32* %xp 18 ret i32 %x 19} 20