1 ; RUN: llc -mtriple=aarch64 -mattr=+sve < %s | FileCheck %s --check-prefix=CHECKCG
2 ; RUN: llc -mtriple=aarch64 -mattr=+sve -stop-after=finalize-isel < %s | FileCheck %s --check-prefix=CHECKISEL
5 ; CHECKCG: addvl sp, sp, #-1
7 ; CHECKISEL-LABEL: name: foo
9 ; CHECKISEL: id: 0, name: ptr, type: default, offset: 0, size: 16, alignment: 16,
10 ; CHECKISEL-NEXT: stack-id: scalable-vector
11 define i32 @foo(<vscale x 16 x i8> %val) {
12 %ptr = alloca <vscale x 16 x i8>
13 %res = call i32 @bar(ptr %ptr)
17 declare i32 @bar(ptr %ptr);
19 ; CHECKCG-LABEL: foo2:
20 ; CHECKCG: addvl sp, sp, #-2
22 ; CHECKISEL-LABEL: name: foo2
24 ; CHECKISEL: id: 0, name: ptr, type: default, offset: 0, size: 32, alignment: 16,
25 ; CHECKISEL-NEXT: stack-id: scalable-vector
27 define i32 @foo2(<vscale x 32 x i8> %val) {
28 %ptr = alloca <vscale x 32 x i8>, align 16
29 %res = call i32 @bar2(ptr %ptr)
32 declare i32 @bar2(ptr %ptr);