summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/GC/cg-O0.ll
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-05-03 16:50:55 +0000
committerdim <dim@FreeBSD.org>2012-05-03 16:50:55 +0000
commit2c5e9d71aba3b1a85f07c08d2c09d40b8547264b (patch)
tree8575c732129e272992ac5d7b4c2519238fff4735 /test/CodeGen/X86/GC/cg-O0.ll
parent1fc08f5e9ef733ef1ce6f363fecedc2260e78974 (diff)
downloadFreeBSD-src-2c5e9d71aba3b1a85f07c08d2c09d40b8547264b.zip
FreeBSD-src-2c5e9d71aba3b1a85f07c08d2c09d40b8547264b.tar.gz
Vendor import of llvm release_31 branch r155985:
http://llvm.org/svn/llvm-project/llvm/branches/release_31@155985
Diffstat (limited to 'test/CodeGen/X86/GC/cg-O0.ll')
-rw-r--r--test/CodeGen/X86/GC/cg-O0.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/X86/GC/cg-O0.ll b/test/CodeGen/X86/GC/cg-O0.ll
new file mode 100644
index 0000000..b492942
--- /dev/null
+++ b/test/CodeGen/X86/GC/cg-O0.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s -O0
+
+define i32 @main() {
+entry:
+ call void @f()
+ ret i32 0
+}
+
+define void @f() gc "ocaml" {
+entry:
+ %ptr.stackref = alloca i8*
+ %gcroot = bitcast i8** %ptr.stackref to i8**
+ call void @llvm.gcroot(i8** %gcroot, i8* null)
+ ret void
+}
+
+declare void @llvm.gcroot(i8**, i8*) nounwind
OpenPOWER on IntegriCloud