summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-09-17 18:36:25 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-09-17 18:36:25 +0000
commitf3fcd7a464afc7c640b8c611ac422f7904c3faa7 (patch)
treed8d0b08bf056d83e2118e4fcdd3947cb077631e6 /llvm/lib/CodeGen
parent7f9671ba37a0a75a85f8c869e7f487e380dc5950 (diff)
downloadbcm5719-llvm-f3fcd7a464afc7c640b8c611ac422f7904c3faa7.tar.gz
bcm5719-llvm-f3fcd7a464afc7c640b8c611ac422f7904c3faa7.zip
Unallocatable registers do not have live intervals.
llvm-svn: 56287
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index e06eb161c08..0044f06d33d 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -568,7 +568,9 @@ SimpleRegisterCoalescing::UpdateRegDefsUses(unsigned SrcReg, unsigned DstReg,
unsigned CopySrcReg, CopyDstReg;
if (TID.getNumDefs() == 1 && TID.getNumOperands() > 2 &&
tii_->isMoveInstr(*UseMI, CopySrcReg, CopyDstReg) &&
- CopySrcReg != CopyDstReg) {
+ CopySrcReg != CopyDstReg &&
+ (TargetRegisterInfo::isVirtualRegister(CopyDstReg) ||
+ allocatableRegs_[CopyDstReg])) {
LiveInterval &LI = li_->getInterval(CopyDstReg);
unsigned DefIdx = li_->getDefIndex(li_->getInstructionIndex(UseMI));
const LiveRange *DLR = LI.getLiveRangeContaining(DefIdx);
OpenPOWER on IntegriCloud