llvm.org GIT mirror llvm / e86ce7d
Tests for changes made in r45356, where IPO optimizations would drop collector algorithms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45357 91177308-0d34-0410-b5e6-96231b3b80d8 Gordon Henriksen 12 years ago
2 changed file(s) with 35 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -anders-aa -argpromotion
1
2 declare void @llvm.gcroot(i8**, i8*)
3
4 define i32 @g() {
5 entry:
6 %var = alloca i32
7 store i32 1, i32* %var
8 %x = call i32 @f(i32* %var)
9 ret i32 %x
10 }
11
12 define internal i32 @f(i32* %xp) gc "example" {
13 entry:
14 %var = alloca i8*
15 call void @llvm.gcroot(i8** %var, i8* null)
16 %x = load i32* %xp
17 ret i32 %x
18 }
0 ; RUN: llvm-as < %s | opt -deadargelim
1
2 declare void @llvm.gcroot(i8**, i8*)
3
4 define void @g() {
5 entry:
6 call void @f(i32 0)
7 ret void
8 }
9
10 define internal void @f(i32 %unused) gc "example" {
11 entry:
12 %var = alloca i8*
13 call void @llvm.gcroot(i8** %var, i8* null)
14 ret void
15 }