1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[LiveRangeEdit] Add assert string and descriptive comment.

llvm-svn: 289456
This commit is contained in:
Geoff Berry 2016-12-12 19:12:41 +00:00
parent 21b7576f48
commit ae2f925550

View File

@ -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);