summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2017-02-08 17:57:27 +0000
committerTim Northover <tnorthover@apple.com>2017-02-08 17:57:27 +0000
commite9600d861cf898b51c33218ea55a924292ba7955 (patch)
tree8ebd34a320d10d350ff8175abcf7d2b0e4edfd6f /llvm/test
parentf19d467ff6c7c14af97b0bdc52f1980488fca0e3 (diff)
downloadbcm5719-llvm-e9600d861cf898b51c33218ea55a924292ba7955.tar.gz
bcm5719-llvm-e9600d861cf898b51c33218ea55a924292ba7955.zip
GlobalISel: select G_VASTART on iOS AArch64.
The AAPCS ABI is substantially more complicated so that's coming in a separate patch. For now we can generate correct code for iOS though. llvm-svn: 294493
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/AArch64/GlobalISel/varargs-ios-translator.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/varargs-ios-translator.ll b/llvm/test/CodeGen/AArch64/GlobalISel/varargs-ios-translator.ll
new file mode 100644
index 00000000000..3bd56fa4ceb
--- /dev/null
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/varargs-ios-translator.ll
@@ -0,0 +1,16 @@
+; RUN: llc -mtriple=aarch64-apple-ios -stop-after=instruction-select -global-isel -verify-machineinstrs %s -o - | FileCheck %s
+
+define void @test_varargs_sentinel(i8* %list, i64, i64, i64, i64, i64, i64, i64,
+ i32, ...) {
+; CHECK-LABEL: name: test_varargs_sentinel
+; CHECK: fixedStack:
+; CHECK: - { id: [[VARARGS_SLOT:[0-9]+]], offset: 8
+; CHECK: body:
+; CHECK: [[LIST:%[0-9]+]] = COPY %x0
+; CHECK: [[VARARGS_AREA:%[0-9]+]] = ADDXri %fixed-stack.[[VARARGS_SLOT]], 0, 0
+; CHECK: STRXui [[VARARGS_AREA]], [[LIST]], 0 :: (store 8 into %ir.list, align 0)
+ call void @llvm.va_start(i8* %list)
+ ret void
+}
+
+declare void @llvm.va_start(i8*)
OpenPOWER on IntegriCloud