From e9600d861cf898b51c33218ea55a924292ba7955 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Wed, 8 Feb 2017 17:57:27 +0000 Subject: 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 --- .../CodeGen/AArch64/GlobalISel/varargs-ios-translator.ll | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 llvm/test/CodeGen/AArch64/GlobalISel/varargs-ios-translator.ll (limited to 'llvm/test/CodeGen') 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*) -- cgit v1.2.3