From 3ebe47ee13fa29f1fdcb74f82ca42770e101b40e Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 22 Oct 2013 08:23:03 +0000 Subject: [PATCH] Add testcase for PR3168. It was fixed over time. PR3168 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193152 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/GC/ocaml-gc-assert.ll | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/CodeGen/X86/GC/ocaml-gc-assert.ll diff --git a/test/CodeGen/X86/GC/ocaml-gc-assert.ll b/test/CodeGen/X86/GC/ocaml-gc-assert.ll new file mode 100644 index 00000000000..b32ceca6344 --- /dev/null +++ b/test/CodeGen/X86/GC/ocaml-gc-assert.ll @@ -0,0 +1,21 @@ +; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s +; PR3168 + +; CHECK-LABEL: append + +define i32* @append() gc "ocaml" { +entry: + switch i32 0, label %L2 [i32 0, label %L1] +L1: + %var8 = alloca i8* + call void @llvm.gcroot(i8** %var8,i8* null) + br label %L3 +L2: + call ccc void @oread_runtime_casenotcovered() + unreachable +L3: + ret i32* null +} + +declare ccc void @oread_runtime_casenotcovered() +declare void @llvm.gcroot(i8**,i8*)