From e67f5de1f7391dac00f4c8f99327b08b7a377c91 Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Tue, 27 Jan 2015 20:03:08 +0000 Subject: [PATCH] overloaded-intrinsic-name: exercise anyptr on struct No other test I know shows how struct names are mangled in overloaded intrinsic functions. Differential Revision: http://reviews.llvm.org/D7037 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227229 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/Generic/overloaded-intrinsic-name.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/CodeGen/Generic/overloaded-intrinsic-name.ll b/test/CodeGen/Generic/overloaded-intrinsic-name.ll index 94494dd96df..aa6a031d8b7 100644 --- a/test/CodeGen/Generic/overloaded-intrinsic-name.ll +++ b/test/CodeGen/Generic/overloaded-intrinsic-name.ll @@ -39,9 +39,19 @@ define <3 x i32>* @test_vAny(<3 x i32>* %v) { ret <3 x i32>* %v-new } +%struct.test = type { i32, i1 } + +; struct +define %struct.test* @test_struct(%struct.test* %v) { + %tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, %struct.test* %v) + %v-new = call %struct.test* @llvm.experimental.gc.relocate.p0struct.test(i32 %tok, i32 4, i32 4) + ret %struct.test* %v-new +} + declare zeroext i1 @return_i1() declare i32 @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()*, i32, i32, ...) declare i32* @llvm.experimental.gc.relocate.p0i32(i32, i32, i32) declare float* @llvm.experimental.gc.relocate.p0f32(i32, i32, i32) declare [3 x i32]* @llvm.experimental.gc.relocate.p0a3i32(i32, i32, i32) declare <3 x i32>* @llvm.experimental.gc.relocate.p0v3i32(i32, i32, i32) +declare %struct.test* @llvm.experimental.gc.relocate.p0struct.test(i32, i32, i32) -- 2.34.1