25 lines · plain
1; RUN: llc -mtriple aarch64-windows -verify-machineinstrs -filetype asm -o - %s | FileCheck %s -check-prefixes=CHECK,CHECK-OPT2; RUN: llc -mtriple aarch64-windows -verify-machineinstrs -filetype asm -o - %s -O0 | FileCheck %s3; RUN: llc -mtriple arm64ec-windows-msvc -verify-machineinstrs -filetype asm -o - %s | FileCheck -check-prefix=CHECK-ARM64EC %s4 5define void @func(i64 %a) {6entry:7 %0 = alloca i8, i64 %a, align 168 call void @func2(ptr nonnull %0)9 ret void10}11 12declare void @func2(ptr)13 14; The -O0 version here ends up much less elegant, so just check the15; details of the optimized form, but check that -O0 at least emits the16; call to __chkstk.17 18; CHECK: add [[REG1:x[0-9]+]], x0, #1519; CHECK-OPT: lsr x15, [[REG1]], #420; CHECK: bl __chkstk21; CHECK-OPT: sub [[REG3:x[0-9]+]], sp, x15, lsl #422; CHECK-OPT: mov sp, [[REG3]]23; CHECK: bl func224; CHECK-ARM64EC: bl "#__chkstk_arm64ec"25