From: Geoff Berry Date: Mon, 12 Dec 2016 19:12:41 +0000 (+0000) Subject: [LiveRangeEdit] Add assert string and descriptive comment. X-Git-Tag: llvmorg-4.0.0-rc1~2319 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d73420d591380d25c34dbc9a1a35c2751ad33b71;p=platform%2Fupstream%2Fllvm.git [LiveRangeEdit] Add assert string and descriptive comment. llvm-svn: 289456 --- diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp index 88fed62..918be47 100644 --- a/llvm/lib/CodeGen/LiveRangeEdit.cpp +++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp @@ -273,7 +273,9 @@ void LiveRangeEdit::eliminateDeadDef(MachineInstr *MI, ToShrinkSet &ToShrink, bool isOrigDef = false; unsigned Dest; if (VRM && MI->getOperand(0).isReg() && MI->getOperand(0).isDef()) { - assert(MI->getDesc().getNumDefs() == 1); + // It is assumed that callers of eliminateDeadDefs() will never pass in dead + // instructions with multiple virtual register defs. + assert(MI->getDesc().getNumDefs() == 1 && "Unexpected instruction with multiple defs."); Dest = MI->getOperand(0).getReg(); unsigned Original = VRM->getOriginal(Dest); LiveInterval &OrigLI = LIS.getInterval(Original);