[llvm-commits] [llvm] r103730 - /llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp

Bob Wilson bob.wilson at apple.com
Thu May 13 12:58:24 PDT 2010


Author: bwilson
Date: Thu May 13 14:58:24 2010
New Revision: 103730

URL: http://llvm.org/viewvc/llvm-project?rev=103730&view=rev
Log:
Fix pr7110: For non-Darwin targets UnspilledCS1GPRs may include high registers.
Do not use those for Thumb1 functions.

Modified:
    llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=103730&r1=103729&r2=103730&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Thu May 13 14:58:24 2010
@@ -779,7 +779,9 @@
       while (NumExtras && !UnspilledCS1GPRs.empty()) {
         unsigned Reg = UnspilledCS1GPRs.back();
         UnspilledCS1GPRs.pop_back();
-        if (!isReservedReg(MF, Reg)) {
+        if (!isReservedReg(MF, Reg) &&
+            (!AFI->isThumb1OnlyFunction() || isARMLowRegister(Reg) ||
+             Reg == ARM::LR)) {
           Extras.push_back(Reg);
           NumExtras--;
         }





More information about the llvm-commits mailing list