1 ; RUN: llc -mtriple aarch64-windows -verify-machineinstrs -filetype asm -o - %s | FileCheck %s -check-prefixes=CHECK,CHECK-OPT
2 ; RUN: llc -mtriple aarch64-windows -verify-machineinstrs -filetype asm -o - %s -O0 | FileCheck %s
3 ; RUN: llc -mtriple arm64ec-windows-msvc -verify-machineinstrs -filetype asm -o - %s | FileCheck -check-prefix=CHECK-ARM64EC %s
5 define void @func(i64 %a) {
7 %0 = alloca i8, i64 %a, align 16
8 call void @func2(ptr nonnull %0)
12 declare void @func2(ptr)
14 ; The -O0 version here ends up much less elegant, so just check the
15 ; details of the optimized form, but check that -O0 at least emits the
18 ; CHECK: add [[REG1:x[0-9]+]], x0, #15
19 ; CHECK-OPT: lsr x15, [[REG1]], #4
21 ; CHECK-OPT: sub [[REG3:x[0-9]+]], sp, x15, lsl #4
22 ; CHECK-OPT: mov sp, [[REG3]]
24 ; CHECK-ARM64EC: bl __chkstk_arm64ec