aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/NVPTX
diff options
context:
space:
mode:
authorJustin Holewinski <jholewinski@nvidia.com>2013-11-15 12:30:04 +0000
committerJustin Holewinski <jholewinski@nvidia.com>2013-11-15 12:30:04 +0000
commit4d748eb0e4b55262619305c96a89c55c30bffe6c (patch)
treeeb4654c603f61924763c9291bb74d05d9f00aa8c /test/CodeGen/NVPTX
parent0dd0d1af2bec2b11dd28f513c1b740d9f6d822fa (diff)
downloadexternal_llvm-4d748eb0e4b55262619305c96a89c55c30bffe6c.zip
external_llvm-4d748eb0e4b55262619305c96a89c55c30bffe6c.tar.gz
external_llvm-4d748eb0e4b55262619305c96a89c55c30bffe6c.tar.bz2
[NVPTX] Fix handling of indirect calls
Using a special machine node is cleaner than an InlineAsm node, and fixes an assertion failure in InstrEmitter git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194810 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/NVPTX')
-rw-r--r--test/CodeGen/NVPTX/callchain.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/NVPTX/callchain.ll b/test/CodeGen/NVPTX/callchain.ll
new file mode 100644
index 0000000..60b118b
--- /dev/null
+++ b/test/CodeGen/NVPTX/callchain.ll
@@ -0,0 +1,10 @@
+; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
+
+target triple = "nvptx"
+
+define void @foo(i8* %ptr) {
+ %fnptr = bitcast i8* %ptr to void ()*
+; CHECK: prototype_0 : .callprototype ()_ ()
+ tail call void %fnptr()
+ ret void
+}