1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple thumbv7-windows -mcpu cortex-a9 -o - %s \ 2*9880d681SAndroid Build Coastguard Worker; RUN: | FileCheck %s -check-prefix CHECK-DEFAULT-CODE-MODEL 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple thumbv7-windows -mcpu cortex-a9 -code-model large -o - %s \ 5*9880d681SAndroid Build Coastguard Worker; RUN: | FileCheck %s -check-prefix CHECK-LARGE-CODE-MODEL 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Workerdeclare dllimport arm_aapcs_vfpcc void @initialise(i8*) 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Workerdefine dllexport arm_aapcs_vfpcc signext i8 @function(i32 %offset) #0 { 10*9880d681SAndroid Build Coastguard Workerentry: 11*9880d681SAndroid Build Coastguard Worker %buffer = alloca [4096 x i8], align 1 12*9880d681SAndroid Build Coastguard Worker %0 = getelementptr inbounds [4096 x i8], [4096 x i8]* %buffer, i32 0, i32 0 13*9880d681SAndroid Build Coastguard Worker call arm_aapcs_vfpcc void @initialise(i8* %0) 14*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds [4096 x i8], [4096 x i8]* %buffer, i32 0, i32 %offset 15*9880d681SAndroid Build Coastguard Worker %1 = load i8, i8* %arrayidx, align 1 16*9880d681SAndroid Build Coastguard Worker ret i8 %1 17*9880d681SAndroid Build Coastguard Worker} 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Workerattributes #0 = { "stack-probe-size"="8096" } 20*9880d681SAndroid Build Coastguard Worker 21*9880d681SAndroid Build Coastguard Worker; CHECK-DEFAULT-CODE-MODEL-NOT: __chkstk 22*9880d681SAndroid Build Coastguard Worker; CHECK-DEFAULT-CODE-MODEL: sub.w sp, sp, #4096 23*9880d681SAndroid Build Coastguard Worker 24*9880d681SAndroid Build Coastguard Worker; CHECK-LARGE-CODE-MODEL-NOT: movw r12, :lower16:__chkstk 25*9880d681SAndroid Build Coastguard Worker; CHECK-LARGE-CODE-MODEL-NOT: movt r12, :upper16:__chkstk 26*9880d681SAndroid Build Coastguard Worker; CHECK-LARGE-CODE-MODEL: sub.w sp, sp, #4096 27*9880d681SAndroid Build Coastguard Worker 28