diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp index f6d00f702ac..630477d7b65 100644 --- a/lib/CodeGen/LiveVariables.cpp +++ b/lib/CodeGen/LiveVariables.cpp @@ -82,6 +82,8 @@ void LiveVariables::MarkVirtRegAliveInBlock(VarInfo &VRInfo, void LiveVariables::HandleVirtRegUse(VarInfo &VRInfo, MachineBasicBlock *MBB, MachineInstr *MI) { + assert(VRInfo.DefInst && "Register use before def!"); + // Check to see if this basic block is already a kill block... if (!VRInfo.Kills.empty() && VRInfo.Kills.back()->getParent() == MBB) { // Yes, this register is killed in this basic block already. Increase the