1 ; RUN: llc < %s -mtriple=x86_64-linux -stack-size-section | FileCheck %s
4 ; CHECK-NEXT: .Lfunc_begin0:
5 ; CHECK: .section .stack_sizes,"o",@progbits
6 ; CHECK-NEXT: .quad .Lfunc_begin0
8 define void @func1(i32, i32) #0 {
15 ; CHECK-NEXT: .Lfunc_begin1:
16 ; CHECK: .section .stack_sizes,"o",@progbits
17 ; CHECK-NEXT: .quad .Lfunc_begin1
18 ; CHECK-NEXT: .byte 24
19 define void @func2() #0 {
21 call void @func1(i32 1, i32 2)
25 ; Check that we still put .stack_sizes into the corresponding COMDAT group if any.
26 ; CHECK: .section .text._Z4fooTIiET_v,"axG",@progbits,_Z4fooTIiET_v,comdat
27 ; CHECK: .section .stack_sizes,"Go",@progbits,_Z4fooTIiET_v,comdat,.text._Z4fooTIiET_v,unique,1
28 $_Z4fooTIiET_v = comdat any
29 define linkonce_odr dso_local i32 @_Z4fooTIiET_v() comdat {
33 ; Check that we assign a unique ID to .stack_sizes if it is linked with a unique .text section.
34 ; CHECK: .section .text.func3,"ax",@progbits
35 ; CHECK: .section .stack_sizes,"o",@progbits,.text.func3,unique,2
36 define dso_local i32 @func3() section ".text.func3" {
37 %1 = alloca i32, align 4
38 store i32 0, i32* %1, align 4
42 ; CHECK-LABEL: dynalloc:
43 ; CHECK-NOT: .section .stack_sizes
44 define void @dynalloc(i32 %N) #0 {
49 attributes #0 = { "no-frame-pointer-elim"="true" }