1; RUN: llc < %s -mtriple=s390x-linux-gnu -stack-size-section | FileCheck %s
2
3; CHECK-LABEL: func1:
4; CHECK-NEXT: .Lfunc_begin0:
5; CHECK: .section .stack_sizes,"o",@progbits,.text{{$}}
6; CHECK-NEXT: .quad .Lfunc_begin0
7; CHECK-NEXT: .byte 0
8define void @func1(i32, i32) #0 {
9  ret void
10}
11
12; CHECK-LABEL: func2:
13; CHECK-NEXT: .Lfunc_begin1:
14; CHECK: .section .stack_sizes,"o",@progbits,.text{{$}}
15; CHECK-NEXT: .quad .Lfunc_begin1
16; CHECK-NEXT: .ascii  "\250\001"
17define void @func2(i32, i32) #0 {
18  alloca i32, align 4
19  alloca i32, align 4
20  ret void
21}
22
23; CHECK-LABEL: func3:
24; CHECK-NEXT: .Lfunc_begin2:
25; CHECK: .section .stack_sizes,"o",@progbits,.text{{$}}
26; CHECK-NEXT: .quad .Lfunc_begin2
27; CHECK-NEXT: .ascii  "\250\001"
28define void @func3() #0 {
29  alloca i32, align 4
30  call void @func1(i32 1, i32 2)
31  ret void
32}
33
34; CHECK-LABEL: dynalloc:
35; CHECK-NOT: .section .stack_sizes
36define void @dynalloc(i32 %N) #0 {
37  alloca i32, i32 %N
38  ret void
39}
40
41attributes #0 = { "frame-pointer"="all" }
42