summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveRangeEdit.cpp
diff options
context:
space:
mode:
authorGeoff Berry <gberry@codeaurora.org>2016-12-12 19:12:41 +0000
committerGeoff Berry <gberry@codeaurora.org>2016-12-12 19:12:41 +0000
commitd73420d591380d25c34dbc9a1a35c2751ad33b71 (patch)
treeb331b17520abb741070d2e66ff0f0b471cadc322 /llvm/lib/CodeGen/LiveRangeEdit.cpp
parent94b25ecdc0af2025b65741df9938a20bd6a4a472 (diff)
downloadbcm5719-llvm-d73420d591380d25c34dbc9a1a35c2751ad33b71.tar.gz
bcm5719-llvm-d73420d591380d25c34dbc9a1a35c2751ad33b71.zip
[LiveRangeEdit] Add assert string and descriptive comment.
llvm-svn: 289456
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveRangeEdit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp
index 88fed6212d1..918be476597 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);
OpenPOWER on IntegriCloud