[PATCH] overloaded-intrinsic-name: exercise anyptr on struct
Ramkumar Ramachandra
artagnon at gmail.com
Sat Jan 17 15:34:28 PST 2015
Hi reames,
No other test I know shows how struct names are mangled in overloaded
intrinsic functions.
http://reviews.llvm.org/D7037
Files:
test/CodeGen/Generic/overloaded-intrinsic-name.ll
Index: test/CodeGen/Generic/overloaded-intrinsic-name.ll
===================================================================
--- test/CodeGen/Generic/overloaded-intrinsic-name.ll
+++ test/CodeGen/Generic/overloaded-intrinsic-name.ll
@@ -39,9 +39,19 @@
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)
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7037.18351.patch
Type: text/x-patch
Size: 1153 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150117/f6a884f7/attachment.bin>
More information about the llvm-commits
mailing list