summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-07-25 19:57:22 +0000
committerMartin Storsjo <martin@martin.st>2017-07-25 19:57:22 +0000
commit84cda2d779215ef0e232535585941cc707992fac (patch)
tree29ed5745760cbf13f1e51b109b8d841dc7a259ce /llvm/test/CodeGen
parent1eac879d85c418650c639baa4fcceeef19e7356a (diff)
downloadbcm5719-llvm-84cda2d779215ef0e232535585941cc707992fac.tar.gz
bcm5719-llvm-84cda2d779215ef0e232535585941cc707992fac.zip
[AArch64] Add a test for float argument passing to win64 vararg functions
The existing tests only tested how a va_start is lowered. Differential Revision: https://reviews.llvm.org/D35540 llvm-svn: 309015
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/AArch64/win64_vararg.ll26
1 files changed, 26 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/win64_vararg.ll b/llvm/test/CodeGen/AArch64/win64_vararg.ll
index 3acc7e520c9..6f48213fb42 100644
--- a/llvm/test/CodeGen/AArch64/win64_vararg.ll
+++ b/llvm/test/CodeGen/AArch64/win64_vararg.ll
@@ -145,3 +145,29 @@ define i32 @snprintf(i8*, i64, i8*, ...) local_unnamed_addr #5 {
call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %5) #2
ret i32 %12
}
+
+; CHECK-LABEL: fixed_params
+; CHECK: sub sp, sp, #32
+; CHECK: mov w8, w3
+; CHECK: mov w9, w2
+; CHECK: mov w10, w1
+; CHECK: str w4, [sp]
+; CHECK: fmov x1, d0
+; CHECK: fmov x3, d1
+; CHECK: fmov x5, d2
+; CHECK: fmov x7, d3
+; CHECK: mov w2, w10
+; CHECK: mov w4, w9
+; CHECK: mov w6, w8
+; CHECK: str x30, [sp, #16]
+; CHECK: str d4, [sp, #8]
+; CHECK: bl varargs
+; CHECK: ldr x30, [sp, #16]
+; CHECK: add sp, sp, #32
+; CHECK: ret
+define void @fixed_params(i32, double, i32, double, i32, double, i32, double, i32, double) nounwind {
+ tail call void (i32, ...) @varargs(i32 %0, double %1, i32 %2, double %3, i32 %4, double %5, i32 %6, double %7, i32 %8, double %9)
+ ret void
+}
+
+declare void @varargs(i32, ...) local_unnamed_addr
OpenPOWER on IntegriCloud