1 ; RUN: llc -mtriple thumbv7-apple-ios3.0.0 < %s 2>&1 >/dev/null | FileCheck %s
2 ; Check the internal option that warns when the stack frame size exceeds the
7 define void @nowarn() nounwind ssp "frame-pointer"="all" "warn-stack-size"="80" {
9 %buffer = alloca [12 x i8], align 1
10 call void @doit(ptr %buffer) nounwind
14 ; CHECK: warning: <unknown>:0:0: stack frame size ([[STCK:[0-9]+]]) exceeds limit (80) in function 'warn'
15 define i32 @warn() nounwind ssp "frame-pointer"="all" "warn-stack-size"="80" {
17 %var = alloca i32, align 4
18 %buffer = alloca [80 x i8], align 1
19 call void @doit(ptr %buffer) nounwind
20 call void @doit(ptr %var) nounwind
21 %val = load i32, ptr %var
25 ; CHECK: warning: <unknown>:0:0: stack frame size ([[STCK:[0-9]+]]) exceeds limit (80) in function 'warn_safestack'
26 define i32 @warn_safestack() nounwind ssp safestack "warn-stack-size"="80" {
28 %var = alloca i32, align 4
29 %a = alloca i32, align 4
30 %buffer = alloca [80 x i8], align 1
31 call void @doit(ptr %buffer) nounwind
32 call void @doit(ptr %var) nounwind
33 %val = load i32, ptr %var
37 declare void @doit(ptr)