Home | History | Annotate | Download | only in ARM
      1 ; ARM EHABI integrated test
      2 
      3 ; This test case checks whether the ARM unwind directives are properly
      4 ; generated or not.
      5 
      6 ; The purpose of the test:
      7 ; (1) .fnstart and .fnend directives should wrap the function.
      8 ; (2) .setfp directive should be available if frame pointer is not eliminated.
      9 ; (3) .save directive should come with push instruction.
     10 ; (4) .vsave directive should come with vpush instruction.
     11 ; (5) .pad directive should come with stack pointer adjustment.
     12 ; (6) .cantunwind directive should be available if the function is marked with
     13 ;     nounwind function attribute.
     14 
     15 ; We have to check several cases:
     16 ; (1) arm with -disable-fp-elim
     17 ; (2) arm without -disable-fp-elim
     18 ; (3) armv7 with -disable-fp-elim
     19 ; (4) armv7 without -disable-fp-elim
     20 
     21 ; RUN: llc -mtriple arm-unknown-linux-gnueabi \
     22 ; RUN:     -disable-fp-elim -filetype=asm -o - %s \
     23 ; RUN:   | FileCheck %s --check-prefix=CHECK-FP
     24 
     25 ; RUN: llc -mtriple arm-unknown-linux-gnueabi \
     26 ; RUN:     -filetype=asm -o - %s \
     27 ; RUN:   | FileCheck %s --check-prefix=CHECK-FP-ELIM
     28 
     29 ; RUN: llc -mtriple armv7-unknown-linux-gnueabi \
     30 ; RUN:     -disable-fp-elim -filetype=asm -o - %s \
     31 ; RUN:   | FileCheck %s --check-prefix=CHECK-V7-FP
     32 
     33 ; RUN: llc -mtriple armv7-unknown-linux-gnueabi \
     34 ; RUN:     -filetype=asm -o - %s \
     35 ; RUN:   | FileCheck %s --check-prefix=CHECK-V7-FP-ELIM
     36 
     37 ; RUN: llc -mtriple arm-unknown-linux-androideabi \
     38 ; RUN:     -disable-fp-elim -filetype=asm -o - %s \
     39 ; RUN:   | FileCheck %s --check-prefix=CHECK-FP
     40 
     41 ; RUN: llc -mtriple arm-unknown-linux-androideabi \
     42 ; RUN:     -filetype=asm -o - %s \
     43 ; RUN:   | FileCheck %s --check-prefix=CHECK-FP-ELIM
     44 
     45 ; RUN: llc -mtriple armv7-unknown-linux-androideabi \
     46 ; RUN:     -disable-fp-elim -filetype=asm -o - %s \
     47 ; RUN:   | FileCheck %s --check-prefix=CHECK-V7-FP
     48 
     49 ; RUN: llc -mtriple armv7-unknown-linux-androideabi \
     50 ; RUN:     -filetype=asm -o - %s \
     51 ; RUN:   | FileCheck %s --check-prefix=CHECK-V7-FP-ELIM
     52 
     53 ; RUN: llc -mtriple arm-unknown-netbsd-eabi \
     54 ; RUN:     -disable-fp-elim -filetype=asm -o - %s \
     55 ; RUN:   | FileCheck %s --check-prefix=DWARF-FP
     56 
     57 ; RUN: llc -mtriple arm-unknown-netbsd-eabi \
     58 ; RUN:     -filetype=asm -o - %s \
     59 ; RUN:   | FileCheck %s --check-prefix=DWARF-FP-ELIM
     60 
     61 ; RUN: llc -mtriple armv7-unknown-netbsd-eabi \
     62 ; RUN:     -disable-fp-elim -filetype=asm -o - %s \
     63 ; RUN:   | FileCheck %s --check-prefix=DWARF-V7-FP
     64 
     65 ; RUN: llc -mtriple armv7-unknown-netbsd-eabi \
     66 ; RUN:     -filetype=asm -o - %s \
     67 ; RUN:   | FileCheck %s --check-prefix=DWARF-V7-FP-ELIM
     68 
     69 ;-------------------------------------------------------------------------------
     70 ; Test 1
     71 ;-------------------------------------------------------------------------------
     72 ; This is the LLVM assembly generated from following C++ code:
     73 ;
     74 ;   extern void print(int, int, int, int, int);
     75 ;   extern void print(double, double, double, double, double);
     76 ;
     77 ;   void test(int a, int b, int c, int d, int e,
     78 ;             double m, double n, double p, double q, double r) {
     79 ;     try {
     80 ;       print(a, b, c, d, e);
     81 ;     } catch (...) {
     82 ;       print(m, n, p, q, r);
     83 ;     }
     84 ;   }
     85 
     86 declare void @_Z5printiiiii(i32, i32, i32, i32, i32)
     87 
     88 declare void @_Z5printddddd(double, double, double, double, double)
     89 
     90 define void @_Z4testiiiiiddddd(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e,
     91                                double %m, double %n, double %p,
     92                                double %q, double %r) {
     93 entry:
     94   invoke void @_Z5printiiiii(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e)
     95           to label %try.cont unwind label %lpad
     96 
     97 lpad:
     98   %0 = landingpad { i8*, i32 }
     99           personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
    100           catch i8* null
    101   %1 = extractvalue { i8*, i32 } %0, 0
    102   %2 = tail call i8* @__cxa_begin_catch(i8* %1)
    103   invoke void @_Z5printddddd(double %m, double %n, double %p,
    104                              double %q, double %r)
    105           to label %invoke.cont2 unwind label %lpad1
    106 
    107 invoke.cont2:
    108   tail call void @__cxa_end_catch()
    109   br label %try.cont
    110 
    111 try.cont:
    112   ret void
    113 
    114 lpad1:
    115   %3 = landingpad { i8*, i32 }
    116           personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
    117           cleanup
    118   invoke void @__cxa_end_catch()
    119           to label %eh.resume unwind label %terminate.lpad
    120 
    121 eh.resume:
    122   resume { i8*, i32 } %3
    123 
    124 terminate.lpad:
    125   %4 = landingpad { i8*, i32 }
    126           personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
    127           catch i8* null
    128   %5 = extractvalue { i8*, i32 } %4, 0
    129   tail call void @__clang_call_terminate(i8* %5)
    130   unreachable
    131 }
    132 
    133 declare void @__clang_call_terminate(i8*)
    134 
    135 declare i32 @__gxx_personality_v0(...)
    136 
    137 declare i8* @__cxa_begin_catch(i8*)
    138 
    139 declare void @__cxa_end_catch()
    140 
    141 declare void @_ZSt9terminatev()
    142 
    143 ; CHECK-FP-LABEL: _Z4testiiiiiddddd:
    144 ; CHECK-FP:   .fnstart
    145 ; CHECK-FP:   .save  {r4, r5, r6, r7, r8, r9, r10, r11, lr}
    146 ; CHECK-FP:   push   {r4, r5, r6, r7, r8, r9, r10, r11, lr}
    147 ; CHECK-FP:   .setfp r11, sp, #28
    148 ; CHECK-FP:   add    r11, sp, #28
    149 ; CHECK-FP:   .pad   #28
    150 ; CHECK-FP:   sub    sp, sp, #28
    151 ; CHECK-FP:   .personality __gxx_personality_v0
    152 ; CHECK-FP:   .handlerdata
    153 ; CHECK-FP:   .fnend
    154 
    155 ; CHECK-FP-ELIM-LABEL: _Z4testiiiiiddddd:
    156 ; CHECK-FP-ELIM:   .fnstart
    157 ; CHECK-FP-ELIM:   .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
    158 ; CHECK-FP-ELIM:   push  {r4, r5, r6, r7, r8, r9, r10, r11, lr}
    159 ; CHECK-FP-ELIM:   .pad  #28
    160 ; CHECK-FP-ELIM:   sub   sp, sp, #28
    161 ; CHECK-FP-ELIM:   .personality __gxx_personality_v0
    162 ; CHECK-FP-ELIM:   .handlerdata
    163 ; CHECK-FP-ELIM:   .fnend
    164 
    165 ; CHECK-V7-FP-LABEL: _Z4testiiiiiddddd:
    166 ; CHECK-V7-FP:   .fnstart
    167 ; CHECK-V7-FP:   .save  {r4, r10, r11, lr}
    168 ; CHECK-V7-FP:   push   {r4, r10, r11, lr}
    169 ; CHECK-V7-FP:   .setfp r11, sp, #8
    170 ; CHECK-V7-FP:   add    r11, sp, #8
    171 ; CHECK-V7-FP:   .vsave {d8, d9, d10, d11, d12}
    172 ; CHECK-V7-FP:   vpush  {d8, d9, d10, d11, d12}
    173 ; CHECK-V7-FP:   .pad   #24
    174 ; CHECK-V7-FP:   sub    sp, sp, #24
    175 ; CHECK-V7-FP:   .personality __gxx_personality_v0
    176 ; CHECK-V7-FP:   .handlerdata
    177 ; CHECK-V7-FP:   .fnend
    178 
    179 ; CHECK-V7-FP-ELIM-LABEL: _Z4testiiiiiddddd:
    180 ; CHECK-V7-FP-ELIM:   .fnstart
    181 ; CHECK-V7-FP-ELIM:   .save  {r4, lr}
    182 ; CHECK-V7-FP-ELIM:   push   {r4, lr}
    183 ; CHECK-V7-FP-ELIM:   .vsave {d8, d9, d10, d11, d12}
    184 ; CHECK-V7-FP-ELIM:   vpush  {d8, d9, d10, d11, d12}
    185 ; CHECK-V7-FP-ELIM:   .pad   #24
    186 ; CHECK-V7-FP-ELIM:   sub    sp, sp, #24
    187 ; CHECK-V7-FP-ELIM:   .personality __gxx_personality_v0
    188 ; CHECK-V7-FP-ELIM:   .handlerdata
    189 ; CHECK-V7-FP-ELIM:   .fnend
    190 
    191 ; DWARF-FP-LABEL: _Z4testiiiiiddddd:
    192 ; DWARF-FP:    .cfi_startproc
    193 ; DWARF-FP:    .cfi_personality 0, __gxx_personality_v0
    194 ; DWARF-FP:    .cfi_lsda 0, .Lexception0
    195 ; DWARF-FP:    push {r4, r5, r6, r7, r8, r9, r10, r11, lr}
    196 ; DWARF-FP:    .cfi_def_cfa_offset 36
    197 ; DWARF-FP:    .cfi_offset lr, -4
    198 ; DWARF-FP:    .cfi_offset r11, -8
    199 ; DWARF-FP:    .cfi_offset r10, -12
    200 ; DWARF-FP:    .cfi_offset r9, -16
    201 ; DWARF-FP:    .cfi_offset r8, -20
    202 ; DWARF-FP:    .cfi_offset r7, -24
    203 ; DWARF-FP:    .cfi_offset r6, -28
    204 ; DWARF-FP:    .cfi_offset r5, -32
    205 ; DWARF-FP:    .cfi_offset r4, -36
    206 ; DWARF-FP:    add r11, sp, #28
    207 ; DWARF-FP:    .cfi_def_cfa r11, 8
    208 ; DWARF-FP:    sub sp, sp, #28
    209 ; DWARF-FP:    sub sp, r11, #28
    210 ; DWARF-FP:    pop {r4, r5, r6, r7, r8, r9, r10, r11, lr}
    211 ; DWARF-FP:    mov pc, lr
    212 ; DWARF-FP:    .cfi_endproc
    213 
    214 ; DWARF-FP-ELIM-LABEL: _Z4testiiiiiddddd:
    215 ; DWARF-FP-ELIM:    .cfi_startproc
    216 ; DWARF-FP-ELIM:    .cfi_personality 0, __gxx_personality_v0
    217 ; DWARF-FP-ELIM:    .cfi_lsda 0, .Lexception0
    218 ; DWARF-FP-ELIM:    push {r4, r5, r6, r7, r8, r9, r10, r11, lr}
    219 ; DWARF-FP-ELIM:    .cfi_def_cfa_offset 36
    220 ; DWARF-FP-ELIM:    .cfi_offset lr, -4
    221 ; DWARF-FP-ELIM:    .cfi_offset r11, -8
    222 ; DWARF-FP-ELIM:    .cfi_offset r10, -12
    223 ; DWARF-FP-ELIM:    .cfi_offset r9, -16
    224 ; DWARF-FP-ELIM:    .cfi_offset r8, -20
    225 ; DWARF-FP-ELIM:    .cfi_offset r7, -24
    226 ; DWARF-FP-ELIM:    .cfi_offset r6, -28
    227 ; DWARF-FP-ELIM:    .cfi_offset r5, -32
    228 ; DWARF-FP-ELIM:    .cfi_offset r4, -36
    229 ; DWARF-FP-ELIM:    sub sp, sp, #28
    230 ; DWARF-FP-ELIM:    .cfi_def_cfa_offset 64
    231 ; DWARF-FP-ELIM:    add sp, sp, #28
    232 ; DWARF-FP-ELIM:    pop {r4, r5, r6, r7, r8, r9, r10, r11, lr}
    233 ; DWARF-FP-ELIM:    mov pc, lr
    234 ; DWARF-FP-ELIM:    .cfi_endproc
    235 
    236 ; DWARF-V7-FP-LABEL: _Z4testiiiiiddddd:
    237 ; DWARF-V7-FP:    .cfi_startproc
    238 ; DWARF-V7-FP:    .cfi_personality 0, __gxx_personality_v0
    239 ; DWARF-V7-FP:    .cfi_lsda 0, .Lexception0
    240 ; DWARF-V7-FP:    push {r4, r10, r11, lr}
    241 ; DWARF-V7-FP:    .cfi_def_cfa_offset 16
    242 ; DWARF-V7-FP:    .cfi_offset lr, -4
    243 ; DWARF-V7-FP:    .cfi_offset r11, -8
    244 ; DWARF-V7-FP:    .cfi_offset r10, -12
    245 ; DWARF-V7-FP:    .cfi_offset r4, -16
    246 ; DWARF-V7-FP:    add r11, sp, #8
    247 ; DWARF-V7-FP:    .cfi_def_cfa r11, 8
    248 ; DWARF-V7-FP:    vpush {d8, d9, d10, d11, d12}
    249 ; DWARF-V7-FP:    .cfi_offset d12, -24
    250 ; DWARF-V7-FP:    .cfi_offset d11, -32
    251 ; DWARF-V7-FP:    .cfi_offset d10, -40
    252 ; DWARF-V7-FP:    .cfi_offset d9, -48
    253 ; DWARF-V7-FP:    sub sp, sp, #24
    254 ; DWARF-V7-FP:    sub sp, r11, #48
    255 ; DWARF-V7-FP:    vpop {d8, d9, d10, d11, d12}
    256 ; DWARF-V7-FP:    pop {r4, r10, r11, pc}
    257 ; DWARF-V7-FP:    .cfi_endproc
    258 
    259 ; DWARF-V7-FP-ELIM-LABEL: _Z4testiiiiiddddd:
    260 ; DWARF-V7-FP-ELIM:    .cfi_startproc
    261 ; DWARF-V7-FP-ELIM:    .cfi_personality 0, __gxx_personality_v0
    262 ; DWARF-V7-FP-ELIM:    .cfi_lsda 0, .Lexception0
    263 ; DWARF-V7-FP-ELIM:    push {r4, lr}
    264 ; DWARF-V7-FP-ELIM:    .cfi_def_cfa_offset 8
    265 ; DWARF-V7-FP-ELIM:    .cfi_offset lr, -4
    266 ; DWARF-V7-FP-ELIM:    .cfi_offset r4, -8
    267 ; DWARF-V7-FP-ELIM:    vpush {d8, d9, d10, d11, d12}
    268 ; DWARF-V7-FP-ELIM:    .cfi_offset d12, -16
    269 ; DWARF-V7-FP-ELIM:    .cfi_offset d11, -24
    270 ; DWARF-V7-FP-ELIM:    .cfi_offset d10, -32
    271 ; DWARF-V7-FP-ELIM:    .cfi_offset d9, -40
    272 ; DWARF-V7-FP-ELIM:    sub sp, sp, #24
    273 ; DWARF-V7-FP-ELIM:    .cfi_def_cfa_offset 72
    274 ; DWARF-V7-FP-ELIM:    add sp, sp, #24
    275 ; DWARF-V7-FP-ELIM:    vpop {d8, d9, d10, d11, d12}
    276 ; DWARF-V7-FP-ELIM:    pop {r4, pc}
    277 ; DWARF-V7-FP-ELIM:    .cfi_endproc
    278 
    279 ;-------------------------------------------------------------------------------
    280 ; Test 2
    281 ;-------------------------------------------------------------------------------
    282 
    283 declare void @throw_exception_2()
    284 
    285 define void @test2() {
    286 entry:
    287   call void @throw_exception_2()
    288   ret void
    289 }
    290 
    291 ; CHECK-FP-LABEL: test2:
    292 ; CHECK-FP:   .fnstart
    293 ; CHECK-FP:   .save  {r11, lr}
    294 ; CHECK-FP:   push   {r11, lr}
    295 ; CHECK-FP:   .setfp r11, sp
    296 ; CHECK-FP:   mov    r11, sp
    297 ; CHECK-FP:   pop    {r11, lr}
    298 ; CHECK-FP:   mov    pc, lr
    299 ; CHECK-FP:   .fnend
    300 
    301 ; CHECK-FP-ELIM-LABEL: test2:
    302 ; CHECK-FP-ELIM:   .fnstart
    303 ; CHECK-FP-ELIM:   .save {r11, lr}
    304 ; CHECK-FP-ELIM:   push  {r11, lr}
    305 ; CHECK-FP-ELIM:   pop   {r11, lr}
    306 ; CHECK-FP-ELIM:   mov   pc, lr
    307 ; CHECK-FP-ELIM:   .fnend
    308 
    309 ; CHECK-V7-FP-LABEL: test2:
    310 ; CHECK-V7-FP:   .fnstart
    311 ; CHECK-V7-FP:   .save  {r11, lr}
    312 ; CHECK-V7-FP:   push   {r11, lr}
    313 ; CHECK-V7-FP:   .setfp r11, sp
    314 ; CHECK-V7-FP:   mov    r11, sp
    315 ; CHECK-V7-FP:   pop    {r11, pc}
    316 ; CHECK-V7-FP:   .fnend
    317 
    318 ; CHECK-V7-FP-ELIM-LABEL: test2:
    319 ; CHECK-V7-FP-ELIM:   .fnstart
    320 ; CHECK-V7-FP-ELIM:   .save {r11, lr}
    321 ; CHECK-V7-FP-ELIM:   push  {r11, lr}
    322 ; CHECK-V7-FP-ELIM:   pop   {r11, pc}
    323 ; CHECK-V7-FP-ELIM:   .fnend
    324 
    325 ; DWARF-FP-LABEL: test2:
    326 ; DWARF-FP:    .cfi_startproc
    327 ; DWARF-FP:    push {r11, lr}
    328 ; DWARF-FP:    .cfi_def_cfa_offset 8
    329 ; DWARF-FP:    .cfi_offset lr, -4
    330 ; DWARF-FP:    .cfi_offset r11, -8
    331 ; DWARF-FP:    mov  r11, sp
    332 ; DWARF-FP:    .cfi_def_cfa_register r11
    333 ; DWARF-FP:    pop  {r11, lr}
    334 ; DWARF-FP:    mov  pc, lr
    335 ; DWARF-FP:    .cfi_endproc
    336 
    337 ; DWARF-FP-ELIM-LABEL: test2:
    338 ; DWARF-FP-ELIM:    .cfi_startproc
    339 ; DWARF-FP-ELIM:    push {r11, lr}
    340 ; DWARF-FP-ELIM:    .cfi_def_cfa_offset 8
    341 ; DWARF-FP-ELIM:    .cfi_offset lr, -4
    342 ; DWARF-FP-ELIM:    .cfi_offset r11, -8
    343 ; DWARF-FP-ELIM:    pop  {r11, lr}
    344 ; DWARF-FP-ELIM:    mov  pc, lr
    345 ; DWARF-FP-ELIM:    .cfi_endproc
    346 
    347 ; DWARF-V7-FP-LABEL: test2:
    348 ; DWARF-V7-FP:    .cfi_startproc
    349 ; DWARF-V7-FP:    push {r11, lr}
    350 ; DWARF-V7-FP:    .cfi_def_cfa_offset 8
    351 ; DWARF-V7-FP:    .cfi_offset lr, -4
    352 ; DWARF-V7-FP:    .cfi_offset r11, -8
    353 ; DWARF-V7-FP:    mov  r11, sp
    354 ; DWARF-V7-FP:    .cfi_def_cfa_register r11
    355 ; DWARF-V7-FP:    pop  {r11, pc}
    356 ; DWARF-V7-FP:    .cfi_endproc
    357 
    358 ; DWARF-V7-FP-ELIM-LABEL: test2:
    359 ; DWARF-V7-FP-ELIM:    .cfi_startproc
    360 ; DWARF-V7-FP-ELIM:    push {r11, lr}
    361 ; DWARF-V7-FP-ELIM:    .cfi_def_cfa_offset 8
    362 ; DWARF-V7-FP-ELIM:    .cfi_offset lr, -4
    363 ; DWARF-V7-FP-ELIM:    .cfi_offset r11, -8
    364 ; DWARF-V7-FP-ELIM:    pop  {r11, pc}
    365 ; DWARF-V7-FP-ELIM:    .cfi_endproc
    366 
    367 
    368 ;-------------------------------------------------------------------------------
    369 ; Test 3
    370 ;-------------------------------------------------------------------------------
    371 
    372 declare void @throw_exception_3(i32)
    373 
    374 define i32 @test3(i32 %a, i32 %b, i32 %c, i32 %d,
    375                   i32 %e, i32 %f, i32 %g, i32 %h) {
    376 entry:
    377   %add = add nsw i32 %b, %a
    378   %add1 = add nsw i32 %add, %c
    379   %add2 = add nsw i32 %add1, %d
    380   tail call void @throw_exception_3(i32 %add2)
    381   %add3 = add nsw i32 %f, %e
    382   %add4 = add nsw i32 %add3, %g
    383   %add5 = add nsw i32 %add4, %h
    384   tail call void @throw_exception_3(i32 %add5)
    385   %add6 = add nsw i32 %add5, %add2
    386   ret i32 %add6
    387 }
    388 
    389 ; CHECK-FP-LABEL: test3:
    390 ; CHECK-FP:   .fnstart
    391 ; CHECK-FP:   .save  {r4, r5, r11, lr}
    392 ; CHECK-FP:   push   {r4, r5, r11, lr}
    393 ; CHECK-FP:   .setfp r11, sp, #8
    394 ; CHECK-FP:   add    r11, sp, #8
    395 ; CHECK-FP:   pop    {r4, r5, r11, lr}
    396 ; CHECK-FP:   mov    pc, lr
    397 ; CHECK-FP:   .fnend
    398 
    399 ; CHECK-FP-ELIM-LABEL: test3:
    400 ; CHECK-FP-ELIM:   .fnstart
    401 ; CHECK-FP-ELIM:   .save {r4, r5, r11, lr}
    402 ; CHECK-FP-ELIM:   push  {r4, r5, r11, lr}
    403 ; CHECK-FP-ELIM:   pop   {r4, r5, r11, lr}
    404 ; CHECK-FP-ELIM:   mov   pc, lr
    405 ; CHECK-FP-ELIM:   .fnend
    406 
    407 ; CHECK-V7-FP-LABEL: test3:
    408 ; CHECK-V7-FP:   .fnstart
    409 ; CHECK-V7-FP:   .save  {r4, r5, r11, lr}
    410 ; CHECK-V7-FP:   push   {r4, r5, r11, lr}
    411 ; CHECK-V7-FP:   .setfp r11, sp, #8
    412 ; CHECK-V7-FP:   add    r11, sp, #8
    413 ; CHECK-V7-FP:   pop    {r4, r5, r11, pc}
    414 ; CHECK-V7-FP:   .fnend
    415 
    416 ; CHECK-V7-FP-ELIM-LABEL: test3:
    417 ; CHECK-V7-FP-ELIM:   .fnstart
    418 ; CHECK-V7-FP-ELIM:   .save {r4, r5, r11, lr}
    419 ; CHECK-V7-FP-ELIM:   push  {r4, r5, r11, lr}
    420 ; CHECK-V7-FP-ELIM:   pop   {r4, r5, r11, pc}
    421 ; CHECK-V7-FP-ELIM:   .fnend
    422 
    423 ; DWARF-FP-LABEL: test3:
    424 ; DWARF-FP:    .cfi_startproc
    425 ; DWARF-FP:    push {r4, r5, r11, lr}
    426 ; DWARF-FP:    .cfi_def_cfa_offset 16
    427 ; DWARF-FP:    .cfi_offset lr, -4
    428 ; DWARF-FP:    .cfi_offset r11, -8
    429 ; DWARF-FP:    .cfi_offset r5, -12
    430 ; DWARF-FP:    .cfi_offset r4, -16
    431 ; DWARF-FP:    add  r11, sp, #8
    432 ; DWARF-FP:    .cfi_def_cfa r11, 8
    433 ; DWARF-FP:    pop  {r4, r5, r11, lr}
    434 ; DWARF-FP:    mov  pc, lr
    435 ; DWARF-FP:    .cfi_endproc
    436 
    437 ; DWARF-FP-ELIM-LABEL: test3:
    438 ; DWARF-FP-ELIM:    .cfi_startproc
    439 ; DWARF-FP-ELIM:    push {r4, r5, r11, lr}
    440 ; DWARF-FP-ELIM:    .cfi_def_cfa_offset 16
    441 ; DWARF-FP-ELIM:    .cfi_offset lr, -4
    442 ; DWARF-FP-ELIM:    .cfi_offset r11, -8
    443 ; DWARF-FP-ELIM:    .cfi_offset r5, -12
    444 ; DWARF-FP-ELIM:    .cfi_offset r4, -16
    445 ; DWARF-FP-ELIM:    pop  {r4, r5, r11, lr}
    446 ; DWARF-FP-ELIM:    mov  pc, lr
    447 ; DWARF-FP-ELIM:    .cfi_endproc
    448 
    449 ; DWARF-V7-FP-LABEL: test3:
    450 ; DWARF-V7-FP:    .cfi_startproc
    451 ; DWARF-V7-FP:    push {r4, r5, r11, lr}
    452 ; DWARF-V7-FP:    .cfi_def_cfa_offset 16
    453 ; DWARF-V7-FP:    .cfi_offset lr, -4
    454 ; DWARF-V7-FP:    .cfi_offset r11, -8
    455 ; DWARF-V7-FP:    .cfi_offset r5, -12
    456 ; DWARF-V7-FP:    .cfi_offset r4, -16
    457 ; DWARF-V7-FP:    add  r11, sp, #8
    458 ; DWARF-V7-FP:    .cfi_def_cfa r11, 8
    459 ; DWARF-V7-FP:    pop  {r4, r5, r11, pc}
    460 ; DWARF-V7-FP:    .cfi_endproc
    461 
    462 ; DWARF-V7-FP-ELIM-LABEL: test3:
    463 ; DWARF-V7-FP-ELIM:    .cfi_startproc
    464 ; DWARF-V7-FP-ELIM:    push {r4, r5, r11, lr}
    465 ; DWARF-V7-FP-ELIM:    .cfi_def_cfa_offset 16
    466 ; DWARF-V7-FP-ELIM:    .cfi_offset lr, -4
    467 ; DWARF-V7-FP-ELIM:    .cfi_offset r11, -8
    468 ; DWARF-V7-FP-ELIM:    .cfi_offset r5, -12
    469 ; DWARF-V7-FP-ELIM:    .cfi_offset r4, -16
    470 ; DWARF-V7-FP-ELIM:    pop  {r4, r5, r11, pc}
    471 ; DWARF-V7-FP-ELIM:    .cfi_endproc
    472 
    473 
    474 ;-------------------------------------------------------------------------------
    475 ; Test 4
    476 ;-------------------------------------------------------------------------------
    477 
    478 define void @test4() nounwind {
    479 entry:
    480   ret void
    481 }
    482 
    483 ; CHECK-FP-LABEL: test4:
    484 ; CHECK-FP:   .fnstart
    485 ; CHECK-FP:   mov pc, lr
    486 ; CHECK-FP:   .cantunwind
    487 ; CHECK-FP:   .fnend
    488 
    489 ; CHECK-FP-ELIM-LABEL: test4:
    490 ; CHECK-FP-ELIM:   .fnstart
    491 ; CHECK-FP-ELIM:   mov pc, lr
    492 ; CHECK-FP-ELIM:   .cantunwind
    493 ; CHECK-FP-ELIM:   .fnend
    494 
    495 ; CHECK-V7-FP-LABEL: test4:
    496 ; CHECK-V7-FP:   .fnstart
    497 ; CHECK-V7-FP:   bx lr
    498 ; CHECK-V7-FP:   .cantunwind
    499 ; CHECK-V7-FP:   .fnend
    500 
    501 ; CHECK-V7-FP-ELIM-LABEL: test4:
    502 ; CHECK-V7-FP-ELIM:   .fnstart
    503 ; CHECK-V7-FP-ELIM:   bx lr
    504 ; CHECK-V7-FP-ELIM:   .cantunwind
    505 ; CHECK-V7-FP-ELIM:   .fnend
    506 
    507 ; DWARF-FP-LABEL: test4:
    508 ; DWARF-FP-NOT: .cfi_startproc
    509 ; DWARF-FP:    mov pc, lr
    510 ; DWARF-FP-NOT: .cfi_endproc
    511 ; DWARF-FP:    .size test4,
    512 
    513 ; DWARF-FP-ELIM-LABEL: test4:
    514 ; DWARF-FP-ELIM-NOT: .cfi_startproc
    515 ; DWARF-FP-ELIM:     mov pc, lr
    516 ; DWARF-FP-ELIM-NOT: .cfi_endproc
    517 ; DWARF-FP-ELIM:     .size test4,
    518 
    519 ; DWARF-V7-FP-LABEL: test4:
    520 ; DWARF-V7-FP-NOT: .cfi_startproc
    521 ; DWARF-V7-FP:    bx lr
    522 ; DWARF-V7-FP-NOT: .cfi_endproc
    523 ; DWARF-V7-FP:    .size test4,
    524 
    525 ; DWARF-V7-FP-ELIM-LABEL: test4:
    526 ; DWARF-V7-FP-ELIM-NOT: .cfi_startproc
    527 ; DWARF-V7-FP-ELIM:     bx lr
    528 ; DWARF-V7-FP-ELIM-NOT: .cfi_endproc
    529 ; DWARF-V7-FP-ELIM:     .size test4,
    530