LegalizeTypes soft-float support for stores of a
[oota-llvm.git] / lib / CodeGen / RegAllocLocal.cpp
index 18e7656bd46e57ce60c67ed5a003a5e7dff65de7..59831f0b707aef295b27960b9dfe9d3648fead81 100644 (file)
@@ -549,10 +549,10 @@ void RALocal::AllocateBasicBlock(MachineBasicBlock &MBB) {
 
   // If this is the first basic block in the machine function, add live-in
   // registers as active.
-  if (&MBB == &*MF->begin()) {
-    for (MachineRegisterInfo::livein_iterator I=MF->getRegInfo().livein_begin(),
-         E = MF->getRegInfo().livein_end(); I != E; ++I) {
-      unsigned Reg = I->first;
+  if (&MBB == &*MF->begin() || MBB.isLandingPad()) {
+    for (MachineBasicBlock::livein_iterator I = MBB.livein_begin(),
+         E = MBB.livein_end(); I != E; ++I) {
+      unsigned Reg = *I;
       MF->getRegInfo().setPhysRegUsed(Reg);
       PhysRegsUsed[Reg] = 0;            // It is free and reserved now
       AddToPhysRegsUseOrder(Reg);