aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/AArch64/win-alloca-no-stack-probe.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 10:51:19 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 10:51:19 +0000
commiteb11fae6d08f479c0799db45860a98af528fa6e7 (patch)
tree44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /test/CodeGen/AArch64/win-alloca-no-stack-probe.ll
parentb8a2042aa938069e862750553db0e4d82d25822c (diff)
Notes
Diffstat (limited to 'test/CodeGen/AArch64/win-alloca-no-stack-probe.ll')
-rw-r--r--test/CodeGen/AArch64/win-alloca-no-stack-probe.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/win-alloca-no-stack-probe.ll b/test/CodeGen/AArch64/win-alloca-no-stack-probe.ll
new file mode 100644
index 000000000000..0ab161f8f27a
--- /dev/null
+++ b/test/CodeGen/AArch64/win-alloca-no-stack-probe.ll
@@ -0,0 +1,17 @@
+; RUN: llc -mtriple aarch64-windows -verify-machineinstrs -filetype asm -o - %s | FileCheck %s
+
+define void @func(i64 %a) "no-stack-arg-probe" {
+entry:
+ %0 = alloca i8, i64 %a, align 16
+ call void @func2(i8* nonnull %0)
+ ret void
+}
+
+declare void @func2(i8*)
+
+; CHECK: add [[REG1:x[0-9]+]], x0, #15
+; CHECK-NOT: bl __chkstk
+; CHECK: mov [[REG2:x[0-9]+]], sp
+; CHECK: and [[REG1]], [[REG1]], #0xfffffffffffffff0
+; CHECK: sub [[REG3:x[0-9]+]], [[REG2]], [[REG1]]
+; CHECK: mov sp, [[REG3]]