summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/XCore
diff options
context:
space:
mode:
authorRichard Osborne <richard@xmos.com>2014-03-04 16:50:30 +0000
committerRichard Osborne <richard@xmos.com>2014-03-04 16:50:30 +0000
commit1b5fc39710c125de6cc6892609c07435889c8979 (patch)
tree44662890f1bdab92d74271d7d52738c04c9321ee /llvm/test/CodeGen/XCore
parentb99c6b5d94eeffc27572748c833e5c22335ddb14 (diff)
downloadbcm5719-llvm-1b5fc39710c125de6cc6892609c07435889c8979.tar.gz
bcm5719-llvm-1b5fc39710c125de6cc6892609c07435889c8979.zip
[XCore] Fix call of absolute address.
Previously for: tail call void inttoptr (i64 65536 to void ()*)() nounwind We would emit: bl 65536 The immediate operand of the bl instruction is a relative offset so it is wrong to use the absolute address here. llvm-svn: 202860
Diffstat (limited to 'llvm/test/CodeGen/XCore')
-rw-r--r--llvm/test/CodeGen/XCore/call.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/XCore/call.ll b/llvm/test/CodeGen/XCore/call.ll
new file mode 100644
index 00000000000..06a12f14440
--- /dev/null
+++ b/llvm/test/CodeGen/XCore/call.ll
@@ -0,0 +1,10 @@
+; RUN: llc < %s -march=xcore | FileCheck %s
+
+; CHECK-LABEL: bl_imm:
+; CHECK: ldw [[R0:r[0-9]+]], cp
+; CHECK: bla [[R0]]
+define void @bl_imm() nounwind {
+entry:
+ tail call void inttoptr (i64 65536 to void ()*)() nounwind
+ ret void
+}
OpenPOWER on IntegriCloud