summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegisterCoalescer.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-15 22:18:49 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-15 22:18:49 +0000
commit1c6a2223d4df34bb19f65dd473bd91ed599c3b7e (patch)
tree6e052d6598859c87f890f965cc69113fb5c673b9 /llvm/lib/CodeGen/RegisterCoalescer.cpp
parentf1ab402ecd4d0ae798d912fd528094c4f9c79c76 (diff)
downloadbcm5719-llvm-1c6a2223d4df34bb19f65dd473bd91ed599c3b7e.tar.gz
bcm5719-llvm-1c6a2223d4df34bb19f65dd473bd91ed599c3b7e.zip
We never call adjustCopiesBackFrom() for partial copies.
There is no need to look at an always null SrcIdx. llvm-svn: 156866
Diffstat (limited to 'llvm/lib/CodeGen/RegisterCoalescer.cpp')
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 8795c0d7151..00393bbe8af 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -408,6 +408,8 @@ void RegisterCoalescer::markAsJoined(MachineInstr *CopyMI) {
///
bool RegisterCoalescer::adjustCopiesBackFrom(const CoalescerPair &CP,
MachineInstr *CopyMI) {
+ assert(!CP.isPartial() && "This doesn't work for partial copies.");
+
// Bail if there is no dst interval - can happen when merging physical subreg
// operations.
if (!LIS->hasInterval(CP.getDstReg()))
@@ -529,7 +531,7 @@ bool RegisterCoalescer::adjustCopiesBackFrom(const CoalescerPair &CP,
// Rewrite the copy. If the copy instruction was killing the destination
// register before the merge, find the last use and trim the live range. That
// will also add the isKill marker.
- CopyMI->substituteRegister(IntA.reg, IntB.reg, CP.getSrcIdx(), *TRI);
+ CopyMI->substituteRegister(IntA.reg, IntB.reg, 0, *TRI);
if (ALR->end == CopyIdx)
LIS->shrinkToUses(&IntA);
OpenPOWER on IntegriCloud