summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-07-08 22:52:47 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-07-08 22:52:47 +0000
commit823e90e12a77d070fd672b8a2616f9f6f33117de (patch)
treef040a2b369e73591d1619e25d4b5b6e3d0f762b9
parentec536276f03e2b280a17eedc382565f5a43e28e4 (diff)
downloadbcm5719-llvm-823e90e12a77d070fd672b8a2616f9f6f33117de.tar.gz
bcm5719-llvm-823e90e12a77d070fd672b8a2616f9f6f33117de.zip
Revert "Fix broken isCopy handling in TrimLiveIntervalToLastUse"
This reverts commit 107921. It broke the clang self host. llvm-svn: 107926
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 2e7e6f8b158..551866ee76a 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -618,14 +618,10 @@ SimpleRegisterCoalescing::TrimLiveIntervalToLastUse(SlotIndex CopyIdx,
// of last use.
LastUse->setIsKill();
removeRange(li, LastUseIdx.getDefIndex(), LR->end, li_, tri_);
- if (LastUseMI->isCopy()) {
- MachineOperand &DefMO = LastUseMI->getOperand(0);
- if (DefMO.getReg() == li.reg && !DefMO.getSubReg())
- DefMO.setIsDead();
- }
unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx;
- if (tii_->isMoveInstr(*LastUseMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx) &&
- DstReg == li.reg && DstSubIdx == 0) {
+ if ((LastUseMI->isCopy() && !LastUseMI->getOperand(0).getSubReg()) ||
+ (tii_->isMoveInstr(*LastUseMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx) &&
+ DstReg == li.reg && DstSubIdx == 0)) {
// Last use is itself an identity code.
int DeadIdx = LastUseMI->findRegisterDefOperandIdx(li.reg,
false, false, tri_);
OpenPOWER on IntegriCloud