[llvm-commits] [llvm] r142021 - /llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Bill Wendling
isanbard at gmail.com
Fri Oct 14 16:55:44 PDT 2011
Author: void
Date: Fri Oct 14 18:55:44 2011
New Revision: 142021
URL: http://llvm.org/viewvc/llvm-project?rev=142021&view=rev
Log:
Make sure that the register is in the register class before adding it as a machine op.
Modified:
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=142021&r1=142020&r2=142021&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Fri Oct 14 18:55:44 2011
@@ -5921,9 +5921,11 @@
MachineInstrBuilder MIB(&*II);
- for (unsigned i = 0; SavedRegs[i] != 0; ++i)
+ for (unsigned i = 0; SavedRegs[i] != 0; ++i) {
+ if (!TRC->contains(SavedRegs[i])) continue;
if (!DefRegs[SavedRegs[i]])
MIB.addReg(SavedRegs[i], RegState::Implicit | RegState::Define);
+ }
break;
}
More information about the llvm-commits
mailing list