xref: /llvm-project/llvm/test/CodeGen/SystemZ/stackmap-dynamic-alloca.ll (revision a1710eb3cd5823c5d14899112ca3086acbdbe9cb)
1; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
2
3; When a function does a dynamic stack allocation, the function's stack size
4; is reported as UINT64_MAX.
5
6; CHECK:       .section .llvm_stackmaps
7; CHECK-NEXT:  __LLVM_StackMaps:
8; Header
9; CHECK-NEXT:   .byte 3
10; CHECK-NEXT:   .byte 0
11; CHECK-NEXT:   .short 0
12; Num Functions
13; CHECK-NEXT:   .long 1
14; Num LargeConstants
15; CHECK-NEXT:   .long 0
16; Num Callsites
17; CHECK-NEXT:   .long 1
18
19; Functions and stack size
20; CHECK-NEXT:   .quad f
21; CHECK-NEXT:   .quad -1
22
23define void @f(i32 %nelems) {
24entry:
25  %mem = alloca i32, i32 %nelems
26  call void (i64, i32, ...) @llvm.experimental.stackmap(i64 0, i32 0, ptr %mem)
27  ret void
28}
29
30declare void @llvm.experimental.stackmap(i64, i32, ...)
31