[PATCH] ARM: When spilling extra registers for alignment, prefer low registers on all Thumb targets.

Renato Golin renato.golin at linaro.org
Thu Apr 23 12:33:26 PDT 2015


LGTM, Thanks!


================
Comment at: test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll:11
@@ -12,1 +10,3 @@
+; CHECK: add r7, sp, #8
+; CHECK: sub.w r4, r7, #8
 ; CHECK: mov sp, r4
----------------
pcc wrote:
> rengolin wrote:
> > This change looks unrelated, do you know why it happens?
> I am not sure exactly. It looks like in this case (and a few others elsewhere) the code is computing a frame pointer in r7 by taking the address of the spilled r7 value. (I don't entirely understand why we compute the frame pointer address this way.) If I look at the rest of the uses of r7, they seem fine, accounting for the change in offset.
Right, makes sense. Not seeing the whole assembly output made me worry. :)

http://reviews.llvm.org/D9165

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list