Fix a bug with the LiveIntervals updating in the two-address pass found by
[oota-llvm.git] / lib / CodeGen / TwoAddressInstructionPass.cpp
index cbe07db3fcbd64d34bbb35d50c9c5bd96c02cd60..aca85b2aa17daefc081eb31fa2fdd15d4cb5067e 100644 (file)
@@ -370,7 +370,7 @@ static bool isPlainlyKilled(MachineInstr *MI, unsigned Reg,
     SlotIndex useIdx = LIS->getInstructionIndex(MI);
     LiveInterval::const_iterator I = LI.find(useIdx);
     assert(I != LI.end() && "Reg must be live-in to use.");
-    return SlotIndex::isSameInstr(I->end, useIdx);
+    return !I->end.isBlock() && SlotIndex::isSameInstr(I->end, useIdx);
   }
 
   return MI->killsRegister(Reg);