1 ; RUN: llc -filetype=asm -o - < %s -mtriple arm-arm-netbsd-eabi -frame-pointer=all| 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
5 %tmp = alloca [ 64 x i32 ] , align 4
9 ; CHECK-ARM-LABEL: test1:
10 ; CHECK-ARM: .cfi_startproc
11 ; CHECK-ARM: sub sp, sp, #256
12 ; CHECK-ARM: .cfi_endproc
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
19 define void @test2() {
20 %tmp = alloca [ 4168 x i8 ] , align 4
24 ; CHECK-ARM-LABEL: test2:
25 ; CHECK-ARM: .cfi_startproc
26 ; CHECK-ARM: push {r4, r5, r11, lr}
27 ; CHECK-ARM: .cfi_def_cfa_offset 16
28 ; CHECK-ARM: .cfi_offset lr, -4
29 ; CHECK-ARM: .cfi_offset r11, -8
30 ; CHECK-ARM: .cfi_offset r5, -12
31 ; CHECK-ARM: .cfi_offset r4, -16
32 ; CHECK-ARM: add r11, sp, #8
33 ; CHECK-ARM: .cfi_def_cfa r11, 8
34 ; CHECK-ARM: sub sp, sp, #72
35 ; CHECK-ARM: sub sp, sp, #4096
36 ; CHECK-ARM: .cfi_endproc
38 ; FIXME: Misspelled CHECK-ARM-FP-ELIM
39 ; CHECK-ARM-FP_ELIM-LABEL: test2:
40 ; CHECK-ARM-FP_ELIM: .cfi_startproc
41 ; CHECK-ARM-FP_ELIM: push {r4, r5}
42 ; CHECK-ARM-FP_ELIM: .cfi_def_cfa_offset 8
43 ; CHECK-ARM-FP_ELIM: .cfi_offset 54, -4
44 ; CHECK-ARM-FP_ELIM: .cfi_offset r4, -8
45 ; CHECK-ARM-FP_ELIM: sub sp, sp, #72
46 ; CHECK-ARM-FP_ELIM: sub sp, sp, #4096
47 ; CHECK-ARM-FP_ELIM: .cfi_def_cfa_offset 4176
48 ; CHECK-ARM-FP_ELIM: .cfi_endproc
51 %retval = alloca i32, align 4
52 %tmp = alloca i32, align 4
53 %a = alloca [805306369 x i8], align 16
54 store i32 0, i32* %tmp
55 %tmp1 = load i32, i32* %tmp
59 ; CHECK-ARM-LABEL: test3:
60 ; CHECK-ARM: .cfi_startproc
61 ; CHECK-ARM: push {r4, r5, r11, lr}
62 ; CHECK-ARM: .cfi_def_cfa_offset 16
63 ; CHECK-ARM: .cfi_offset lr, -4
64 ; CHECK-ARM: .cfi_offset r11, -8
65 ; CHECK-ARM: .cfi_offset r5, -12
66 ; CHECK-ARM: .cfi_offset r4, -16
67 ; CHECK-ARM: add r11, sp, #8
68 ; CHECK-ARM: .cfi_def_cfa r11, 8
69 ; CHECK-ARM: sub sp, sp, #16
70 ; CHECK-ARM: sub sp, sp, #805306368
71 ; CHECK-ARM: bic sp, sp, #15
72 ; CHECK-ARM: .cfi_endproc
74 ; CHECK-ARM-FP-ELIM-LABEL: test3:
75 ; CHECK-ARM-FP-ELIM: .cfi_startproc
76 ; CHECK-ARM-FP-ELIM: push {r4, r5, r11}
77 ; CHECK-ARM-FP-ELIM: .cfi_def_cfa_offset 12
78 ; CHECK-ARM-FP-ELIM: .cfi_offset r11, -4
79 ; CHECK-ARM-FP-ELIM: .cfi_offset r5, -8
80 ; CHECK-ARM-FP-ELIM: .cfi_offset r4, -12
81 ; CHECK-ARM-FP-ELIM: add r11, sp, #8
82 ; CHECK-ARM-FP-ELIM: .cfi_def_cfa r11, 4
83 ; CHECK-ARM-FP-ELIM: sub sp, sp, #20
84 ; CHECK-ARM-FP-ELIM: sub sp, sp, #805306368
85 ; CHECK-ARM-FP-ELIM: bic sp, sp, #15
86 ; CHECK-ARM-FP-ELIM: .cfi_endproc