[MIParser] Set RegClassOrRegBank during instruction parsing
[llvm-complete.git] / test / CodeGen / AArch64 / chkstk.ll
blob9689a3b9b588ac7b21322b864f9e5a10dd87be8c
1 ; RUN: llc -mtriple=aarch64-windows -verify-machineinstrs %s -o - \
2 ; RUN:  | FileCheck -check-prefix CHECK-DEFAULT-CODE-MODEL %s
3 ; RUN: llc -mtriple=aarch64-windows -print-machineinstrs=prologepilog %s -o - 2>&1 \
4 ; RUN:  | FileCheck -check-prefix CHECK-REGSTATE %s
6 ; RUN: llc -mtriple=aarch64-windows -verify-machineinstrs -code-model=large %s -o - \
7 ; RUN:  | FileCheck -check-prefix CHECK-LARGE-CODE-MODEL %s
8 ; RUN: llc -mtriple=aarch64-windows -print-machineinstrs=prologepilog -code-model=large %s -o - 2>&1 \
9 ; RUN:  | FileCheck -check-prefix CHECK-REGSTATE-LARGE %s
11 define void @check_watermark() {
12 entry:
13   %buffer = alloca [4096 x i8], align 1
14   ret void
17 ; CHECK-DEFAULT-CODE-MODEL: check_watermark:
18 ; CHECK-DEFAULT-CODE-MODEL-DAG: stp x29, x30, [sp
19 ; CHECK-DEFAULT-CODE-MODEL-DAG: mov x15, #256
20 ; CHECK-DEFAULT-CODE-MODEL:     bl __chkstk
21 ; CHECK-DEFAULT-CODE-MODEL:     sub sp, sp, x15, lsl #4
23 ; CHECK-REGSTATE: frame-setup BL &__chkstk, implicit-def $lr, implicit $sp, implicit $x15, implicit-def dead $x16, implicit-def dead $x17, implicit-def dead $nzcv
25 ; CHECK-LARGE-CODE-MODEL: check_watermark:
26 ; CHECK-LARGE-CODE-MODEL-DAG: stp x29, x30, [sp
27 ; CHECK-LARGE-CODE-MODEL-DAG: mov x15, #256
28 ; CHECK-LARGE-CODE-MODEL-DAG: adrp x16, __chkstk
29 ; CHECK-LARGE-CODE-MODEL-DAG: add x16, x16, __chkstk
30 ; CHECK-LARGE-CODE-MODEL:     blr x16
31 ; CHECK-LARGE-CODE-MODEL:     sub sp, sp, x15, lsl #4
33 ; CHECK-REGSTATE-LARGE: frame-setup BLR killed $x16, implicit-def $lr, implicit $sp, implicit-def $x15, implicit-def dead $x16, implicit-def dead $x17, implicit-def dead $nzcv