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