It will just be the same as the regular calling convention.
rdar://
28029509
llvm-svn: 279853
return false;
CallingConv::ID CC = F->getCallingConv();
- if (CC != CallingConv::C)
+ if (CC != CallingConv::C && CC != CallingConv::Swift)
return false;
// Only handle simple cases of up to 8 GPR and FPR each.
case CallingConv::Fast:
case CallingConv::PreserveMost:
case CallingConv::CXX_FAST_TLS:
+ case CallingConv::Swift:
if (!Subtarget->isTargetDarwin())
return CC_AArch64_AAPCS;
return IsVarArg ? CC_AArch64_DarwinPCS_VarArg : CC_AArch64_DarwinPCS;
--- /dev/null
+; RUN: llc -verify-machineinstrs -mtriple=aarch64-apple-ios -o - %s | FileCheck %s
+; RUN: llc -O0 -verify-machineinstrs -mtriple=aarch64-apple-ios -o - %s | FileCheck %s
+
+; CHECK: t1
+; CHECK: fadd s0, s0, s1
+; CHECK: ret
+define swiftcc float @t1(float %a, float %b) {
+entry:
+ %add = fadd float %a, %b
+ ret float %add
+}