1; RUN: llc < %s -march=thumb -mcpu=arm1156t2-s -mattr=+thumb2 \ 2; RUN: -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=DARWIN 3; RUN: llc < %s -march=thumb -mcpu=arm1156t2-s -mattr=+thumb2 \ 4; RUN: -mtriple=arm-linux-gnueabi | FileCheck %s -check-prefix=LINUX 5 6define void @test1() { 7; DARWIN-LABEL: test1: 8; DARWIN: sub sp, #256 9; LINUX-LABEL: test1: 10; LINUX: sub sp, #256 11 %tmp = alloca [ 64 x i32 ] , align 4 12 ret void 13} 14 15define void @test2() { 16; DARWIN-LABEL: test2: 17; DARWIN: sub.w sp, sp, #4160 18; DARWIN: sub sp, #8 19; LINUX-LABEL: test2: 20; LINUX: sub.w sp, sp, #4160 21; LINUX: sub sp, #8 22 %tmp = alloca [ 4168 x i8 ] , align 4 23 ret void 24} 25 26define i32 @test3() { 27; DARWIN-LABEL: test3: 28; DARWIN: push {r4, r7, lr} 29; DARWIN: sub.w sp, sp, #805306368 30; DARWIN: sub sp, #20 31; LINUX-LABEL: test3: 32; LINUX: push {r4, r6, r7, lr} 33; LINUX: sub.w sp, sp, #805306368 34; LINUX: sub sp, #16 35 %retval = alloca i32, align 4 36 %tmp = alloca i32, align 4 37 %a = alloca [805306369 x i8], align 16 38 store i32 0, i32* %tmp 39 %tmp1 = load i32, i32* %tmp 40 ret i32 %tmp1 41} 42