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
4 define void @func(i64 %a) {
6 %0 = alloca i8, i64 %a, align 16
7 call void @func2(i8* nonnull %0)
11 declare void @func2(i8*)
13 ; The -O0 version here ends up much less elegant, so just check the
14 ; details of the optimized form, but check that -O0 at least emits the
17 ; CHECK: add [[REG1:x[0-9]+]], x0, #15
18 ; CHECK-OPT: lsr x15, [[REG1]], #4
20 ; CHECK: mov [[REG2:x[0-9]+]], sp
21 ; CHECK-OPT: sub [[REG3:x[0-9]+]], [[REG2]], x15, lsl #4
22 ; CHECK-OPT: mov sp, [[REG3]]