repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[TableGen] Fix validateOperandClass for non Phyical Reg (#118146)
[llvm-project.git]
/
llvm
/
test
/
CodeGen
/
X86
/
GC
/
argpromotion.ll
blob
f9fed1587c64141a7b81023b5c823c91b961e089
1
; RUN: opt < %s -passes=argpromotion
2
3
declare void @llvm.gcroot(ptr, ptr)
4
5
define i32 @g() {
6
entry:
7
%var = alloca i32
8
store i32 1, ptr %var
9
%x = call i32 @f(ptr %var)
10
ret i32 %x
11
}
12
13
define internal i32 @f(ptr %xp) gc "example" {
14
entry:
15
%var = alloca ptr
16
call void @llvm.gcroot(ptr %var, ptr null)
17
%x = load i32, ptr %xp
18
ret i32 %x
19
}