diff options
author | Justin Holewinski <jholewinski@nvidia.com> | 2013-11-15 12:30:04 +0000 |
---|---|---|
committer | Justin Holewinski <jholewinski@nvidia.com> | 2013-11-15 12:30:04 +0000 |
commit | 4d748eb0e4b55262619305c96a89c55c30bffe6c (patch) | |
tree | eb4654c603f61924763c9291bb74d05d9f00aa8c /test | |
parent | 0dd0d1af2bec2b11dd28f513c1b740d9f6d822fa (diff) | |
download | external_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')
-rw-r--r-- | test/CodeGen/NVPTX/callchain.ll | 10 |
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 +} |