summaryrefslogtreecommitdiff
path: root/lib
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
commit870e4bef419b1bd3e5ee05673975f1c05198b612 (patch)
tree0b0ce81706f3dbd2b255d2c77f67bb4cf6e3d68e /lib
parent48fbc2d39b6efbd8d2d02e830cc91ab6e49b8dde (diff)
downloadllvm-870e4bef419b1bd3e5ee05673975f1c05198b612.tar.gz
llvm-870e4bef419b1bd3e5ee05673975f1c05198b612.tar.bz2
llvm-870e4bef419b1bd3e5ee05673975f1c05198b612.tar.xz
Unallocatable registers do not have live intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56287 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp
index e06eb161c0..0044f06d33 100644
--- a/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/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);