• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=armv7-linux -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: .long .Lfunc_begin0
7; CHECK-NEXT: .byte 8
8define void @func1(i32, i32) #0 {
9  alloca i32, align 4
10  alloca i32, align 4
11  ret void
12}
13
14; CHECK-LABEL: func2:
15; CHECK-NEXT: .Lfunc_begin1:
16; CHECK: .section .stack_sizes,"o",%progbits,.text{{$}}
17; CHECK-NEXT: .long .Lfunc_begin1
18; CHECK-NEXT: .byte 16
19define void @func2() #0 {
20  alloca i32, align 4
21  call void @func1(i32 1, i32 2)
22  ret void
23}
24
25; CHECK-LABEL: dynalloc:
26; CHECK-NOT: .section .stack_sizes
27define void @dynalloc(i32 %N) #0 {
28  alloca i32, i32 %N
29  ret void
30}
31
32attributes #0 = { "frame-pointer"="all" }
33