summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/AArch64/arm64-join-reserved.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/AArch64/arm64-join-reserved.ll')
-rw-r--r--test/CodeGen/AArch64/arm64-join-reserved.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/arm64-join-reserved.ll b/test/CodeGen/AArch64/arm64-join-reserved.ll
new file mode 100644
index 0000000..e99168b
--- /dev/null
+++ b/test/CodeGen/AArch64/arm64-join-reserved.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s -verify-machineinstrs | FileCheck %s
+target triple = "arm64-apple-macosx10"
+
+; Make sure that a store to [sp] addresses off sp directly.
+; A move isn't necessary.
+; <rdar://problem/11492712>
+; CHECK-LABEL: g:
+; CHECK: str xzr, [sp]
+; CHECK: bl
+; CHECK: ret
+define void @g() nounwind ssp {
+entry:
+ tail call void (i32, ...)* @f(i32 0, i32 0) nounwind
+ ret void
+}
+
+declare void @f(i32, ...)