If a function needs a frame pointer, but r11 (aka fp) has not been used,

remove it from the list of unspilled registers. Otherwise the following
attempt to keep the stack aligned by picking an extra GPR register to
spill will not work as it picks up r11.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208129 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Joerg Sonnenberger
2014-05-06 20:43:01 +00:00
parent d474181920
commit b84f890bc3
6 changed files with 42 additions and 36 deletions

View File

@@ -201,12 +201,13 @@ declare void @_ZSt9terminatev()
; CHECK-V7-FP-LABEL: _Z4testiiiiiddddd:
; CHECK-V7-FP: .cfi_startproc
; CHECK-V7-FP: push {r4, r11, lr}
; CHECK-V7-FP: .cfi_def_cfa_offset 12
; CHECK-V7-FP: push {r4, r10, r11, lr}
; CHECK-V7-FP: .cfi_def_cfa_offset 16
; CHECK-V7-FP: .cfi_offset lr, -4
; CHECK-V7-FP: .cfi_offset r11, -8
; CHECK-V7-FP: .cfi_offset r4, -12
; CHECK-V7-FP: add r11, sp, #4
; CHECK-V7-FP: .cfi_offset r10, -12
; CHECK-V7-FP: .cfi_offset r4, -16
; CHECK-V7-FP: add r11, sp, #8
; CHECK-V7-FP: .cfi_def_cfa r11, 8
; CHECK-V7-FP: vpush {d8, d9, d10, d11, d12}
; CHECK-V7-FP: .cfi_offset d12, -24
@@ -214,7 +215,7 @@ declare void @_ZSt9terminatev()
; CHECK-V7-FP: .cfi_offset d10, -40
; CHECK-V7-FP: .cfi_offset d9, -48
; CHECK-V7-FP: .cfi_offset d8, -56
; CHECK-V7-FP: sub sp, sp, #28
; CHECK-V7-FP: sub sp, sp, #24
; CHECK-V7-FP: .cfi_endproc
; CHECK-V7-FP-ELIM-LABEL: _Z4testiiiiiddddd: