Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc -filetype=asm -o - < %s -mtriple arm-arm-none-eabi -disable-fp-elim| FileCheck %s --check-prefix=CHECK-ARM
      2 ; RUN: llc -filetype=asm -o - < %s -mtriple arm-arm-none-eabi | FileCheck %s --check-prefix=CHECK-ARM-FP-ELIM
      3 
      4 define void @test1() {
      5     %tmp = alloca [ 64 x i32 ] , align 4
      6     ret void
      7 }
      8 
      9 !llvm.dbg.cu = !{!0}
     10 !llvm.module.flags = !{!8, !9}
     11 !llvm.ident = !{!10}
     12 
     13 !0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.5 ", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2, metadata !""} ; [ DW_TAG_compile_unit ] [/tmp/large.c] [DW_LANG_C99]
     14 !1 = metadata !{metadata !"large.c", metadata !"/tmp"}
     15 !2 = metadata !{}
     16 !3 = metadata !{metadata !4}
     17 !4 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"test1", metadata !"test1", metadata !"", i32 1, metadata !6, i1 false, i1 true, i32 0, i32 0, null, i32 0, i1 false, void ()* @test1, null, null, metadata !2, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [test1]
     18 !5 = metadata !{i32 786473, metadata !1}          ; [ DW_TAG_file_type ] [/tmp/large.c]
     19 !6 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !7, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
     20 !7 = metadata !{null}
     21 !8 = metadata !{i32 2, metadata !"Dwarf Version", i32 4}
     22 !9 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
     23 !10 = metadata !{metadata !"clang version 3.5 "}
     24 !11 = metadata !{i32 2, i32 0, metadata !4, null}
     25 
     26 ; CHECK-ARM-LABEL: test1:
     27 ; CHECK-ARM: .cfi_startproc
     28 ; CHECK-ARM: sub    sp, sp, #256
     29 ; CHECK-ARM: .cfi_endproc
     30 
     31 ; CHECK-ARM-FP-ELIM-LABEL: test1:
     32 ; CHECK-ARM-FP-ELIM: .cfi_startproc
     33 ; CHECK-ARM-FP-ELIM: sub    sp, sp, #256
     34 ; CHECK-ARM-FP-ELIM: .cfi_endproc
     35 
     36 define void @test2() {
     37     %tmp = alloca [ 4168 x i8 ] , align 4
     38     ret void
     39 }
     40 
     41 ; CHECK-ARM-LABEL: test2:
     42 ; CHECK-ARM: .cfi_startproc
     43 ; CHECK-ARM: push    {r4, r5}
     44 ; CHECK-ARM: .cfi_def_cfa_offset 8
     45 ; CHECK-ARM: .cfi_offset r5, -4
     46 ; CHECK-ARM: .cfi_offset r4, -8
     47 ; CHECK-ARM: sub    sp, sp, #72
     48 ; CHECK-ARM: sub    sp, sp, #4096
     49 ; CHECK-ARM: .cfi_def_cfa_offset 4176
     50 ; CHECK-ARM: .cfi_endproc
     51 
     52 ; CHECK-ARM-FP_ELIM-LABEL: test2:
     53 ; CHECK-ARM-FP_ELIM: .cfi_startproc
     54 ; CHECK-ARM-FP_ELIM: push    {r4, r5}
     55 ; CHECK-ARM-FP_ELIM: .cfi_def_cfa_offset 8
     56 ; CHECK-ARM-FP_ELIM: .cfi_offset 54, -4
     57 ; CHECK-ARM-FP_ELIM: .cfi_offset r4, -8
     58 ; CHECK-ARM-FP_ELIM: sub    sp, sp, #72
     59 ; CHECK-ARM-FP_ELIM: sub    sp, sp, #4096
     60 ; CHECK-ARM-FP_ELIM: .cfi_def_cfa_offset 4176
     61 ; CHECK-ARM-FP_ELIM: .cfi_endproc
     62 
     63 define i32 @test3() {
     64 	%retval = alloca i32, align 4
     65 	%tmp = alloca i32, align 4
     66 	%a = alloca [805306369 x i8], align 16
     67 	store i32 0, i32* %tmp
     68 	%tmp1 = load i32* %tmp
     69         ret i32 %tmp1
     70 }
     71 
     72 ; CHECK-ARM-LABEL: test3:
     73 ; CHECK-ARM: .cfi_startproc
     74 ; CHECK-ARM: push    {r4, r5, r11}
     75 ; CHECK-ARM: .cfi_def_cfa_offset 12
     76 ; CHECK-ARM: .cfi_offset r11, -4
     77 ; CHECK-ARM: .cfi_offset r5, -8
     78 ; CHECK-ARM: .cfi_offset r4, -12
     79 ; CHECK-ARM: add    r11, sp, #8
     80 ; CHECK-ARM: .cfi_def_cfa r11, 4
     81 ; CHECK-ARM: sub    sp, sp, #20
     82 ; CHECK-ARM: sub    sp, sp, #805306368
     83 ; CHECK-ARM: bic    sp, sp, #15
     84 ; CHECK-ARM: .cfi_endproc
     85 
     86 ; CHECK-ARM-FP-ELIM-LABEL: test3:
     87 ; CHECK-ARM-FP-ELIM: .cfi_startproc
     88 ; CHECK-ARM-FP-ELIM: push    {r4, r5, r11}
     89 ; CHECK-ARM-FP-ELIM: .cfi_def_cfa_offset 12
     90 ; CHECK-ARM-FP-ELIM: .cfi_offset r11, -4
     91 ; CHECK-ARM-FP-ELIM: .cfi_offset r5, -8
     92 ; CHECK-ARM-FP-ELIM: .cfi_offset r4, -12
     93 ; CHECK-ARM-FP-ELIM: add    r11, sp, #8
     94 ; CHECK-ARM-FP-ELIM: .cfi_def_cfa r11, 4
     95 ; CHECK-ARM-FP-ELIM: sub    sp, sp, #20
     96 ; CHECK-ARM-FP-ELIM: sub    sp, sp, #805306368
     97 ; CHECK-ARM-FP-ELIM: bic    sp, sp, #15
     98 ; CHECK-ARM-FP-ELIM: .cfi_endproc
     99 
    100