summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBrendon Cahoon <bcahoon@codeaurora.org>2017-02-04 00:10:22 +0000
committerBrendon Cahoon <bcahoon@codeaurora.org>2017-02-04 00:10:22 +0000
commit9809b10586b789170ceef7a3764fa18b94cc496e (patch)
tree8bc38595a16acba4d01987e85231b866baede13d /llvm/lib
parentcd8ea02b4a4c8274ed82f3f2e939f1b9ac5dc6cc (diff)
downloadbcm5719-llvm-9809b10586b789170ceef7a3764fa18b94cc496e.tar.gz
bcm5719-llvm-9809b10586b789170ceef7a3764fa18b94cc496e.zip
[RegisterCoalescer] Do not call getInstructionIndex with DBG_VALUE
An assert occurs when calling SlotIndexes::getInstructionIndex with a DBG_VALUE instruction because the function expects an instruction with a slot index. However, there is no slot index for a DBG_VALUE instruction. Differential Revision: https://reviews.llvm.org/D29048 llvm-svn: 294070
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index f4cc37d9ca0..136a949cb6f 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -1472,7 +1472,7 @@ void RegisterCoalescer::updateRegDefsUses(unsigned SrcReg,
// If SrcReg wasn't read, it may still be the case that DstReg is live-in
// because SrcReg is a sub-register.
- if (DstInt && !Reads && SubIdx)
+ if (DstInt && !Reads && SubIdx && !UseMI->isDebugValue())
Reads = DstInt->liveAt(LIS->getInstructionIndex(*UseMI));
// Replace SrcReg with DstReg in all UseMI operands.
OpenPOWER on IntegriCloud