diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-05-01 22:50:45 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-05-01 22:50:45 +0000 |
commit | 95dd4420419a6daae6304ed490a50537094ed488 (patch) | |
tree | 6708c49e7890e72dd4af36deaec6f57372f51ba6 /test/CodeGen/X86/GC/cg-O0.ll | |
parent | 902337092fef14ce2519b4c93c37d72bf66ce768 (diff) | |
download | llvm-95dd4420419a6daae6304ed490a50537094ed488.tar.gz llvm-95dd4420419a6daae6304ed490a50537094ed488.tar.bz2 llvm-95dd4420419a6daae6304ed490a50537094ed488.tar.xz |
Strip the pointer casts off of allocas so that the selection DAG can find them.
PR10799
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/GC/cg-O0.ll')
-rw-r--r-- | test/CodeGen/X86/GC/cg-O0.ll | 17 |
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 0000000000..b4929425e9 --- /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 |