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

Peter Collingbourne peter at pcc.me.uk
Thu Apr 23 12:27:05 PDT 2015


================
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
----------------
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.

http://reviews.llvm.org/D9165

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






More information about the llvm-commits mailing list