1; RUN: llc -filetype=asm -o - < %s -mtriple arm-arm-netbsd-eabi -disable-fp-elim| FileCheck %s --check-prefix=CHECK-ARM 2; RUN: llc -filetype=asm -o - < %s -mtriple arm-arm-netbsd-eabi | FileCheck %s --check-prefix=CHECK-ARM-FP-ELIM 3 4define void @test1() { 5 %tmp = alloca [ 64 x i32 ] , align 4 6 ret void 7} 8 9; CHECK-ARM-LABEL: test1: 10; CHECK-ARM: .cfi_startproc 11; CHECK-ARM: sub sp, sp, #256 12; CHECK-ARM: .cfi_endproc 13 14; CHECK-ARM-FP-ELIM-LABEL: test1: 15; CHECK-ARM-FP-ELIM: .cfi_startproc 16; CHECK-ARM-FP-ELIM: sub sp, sp, #256 17; CHECK-ARM-FP-ELIM: .cfi_endproc 18 19define void @test2() { 20 %tmp = alloca [ 4168 x i8 ] , align 4 21 ret void 22} 23 24; CHECK-ARM-LABEL: test2: 25; CHECK-ARM: .cfi_startproc 26; CHECK-ARM: push {r4, r5} 27; CHECK-ARM: .cfi_def_cfa_offset 8 28; CHECK-ARM: .cfi_offset r5, -4 29; CHECK-ARM: .cfi_offset r4, -8 30; CHECK-ARM: sub sp, sp, #72 31; CHECK-ARM: sub sp, sp, #4096 32; CHECK-ARM: .cfi_def_cfa_offset 4176 33; CHECK-ARM: .cfi_endproc 34 35; CHECK-ARM-FP_ELIM-LABEL: test2: 36; CHECK-ARM-FP_ELIM: .cfi_startproc 37; CHECK-ARM-FP_ELIM: push {r4, r5} 38; CHECK-ARM-FP_ELIM: .cfi_def_cfa_offset 8 39; CHECK-ARM-FP_ELIM: .cfi_offset 54, -4 40; CHECK-ARM-FP_ELIM: .cfi_offset r4, -8 41; CHECK-ARM-FP_ELIM: sub sp, sp, #72 42; CHECK-ARM-FP_ELIM: sub sp, sp, #4096 43; CHECK-ARM-FP_ELIM: .cfi_def_cfa_offset 4176 44; CHECK-ARM-FP_ELIM: .cfi_endproc 45 46define i32 @test3() { 47 %retval = alloca i32, align 4 48 %tmp = alloca i32, align 4 49 %a = alloca [805306369 x i8], align 16 50 store i32 0, i32* %tmp 51 %tmp1 = load i32, i32* %tmp 52 ret i32 %tmp1 53} 54 55; CHECK-ARM-LABEL: test3: 56; CHECK-ARM: .cfi_startproc 57; CHECK-ARM: push {r4, r5, r11} 58; CHECK-ARM: .cfi_def_cfa_offset 12 59; CHECK-ARM: .cfi_offset r11, -4 60; CHECK-ARM: .cfi_offset r5, -8 61; CHECK-ARM: .cfi_offset r4, -12 62; CHECK-ARM: add r11, sp, #8 63; CHECK-ARM: .cfi_def_cfa r11, 4 64; CHECK-ARM: sub sp, sp, #20 65; CHECK-ARM: sub sp, sp, #805306368 66; CHECK-ARM: bic sp, sp, #15 67; CHECK-ARM: .cfi_endproc 68 69; CHECK-ARM-FP-ELIM-LABEL: test3: 70; CHECK-ARM-FP-ELIM: .cfi_startproc 71; CHECK-ARM-FP-ELIM: push {r4, r5, r11} 72; CHECK-ARM-FP-ELIM: .cfi_def_cfa_offset 12 73; CHECK-ARM-FP-ELIM: .cfi_offset r11, -4 74; CHECK-ARM-FP-ELIM: .cfi_offset r5, -8 75; CHECK-ARM-FP-ELIM: .cfi_offset r4, -12 76; CHECK-ARM-FP-ELIM: add r11, sp, #8 77; CHECK-ARM-FP-ELIM: .cfi_def_cfa r11, 4 78; CHECK-ARM-FP-ELIM: sub sp, sp, #20 79; CHECK-ARM-FP-ELIM: sub sp, sp, #805306368 80; CHECK-ARM-FP-ELIM: bic sp, sp, #15 81; CHECK-ARM-FP-ELIM: .cfi_endproc 82 83