aboutsummaryrefslogtreecommitdiffstats
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
commit13af991aa22eabaf36be6acb70edd354d0242a89 (patch)
tree0b0ce81706f3dbd2b255d2c77f67bb4cf6e3d68e /lib
parentdff594ed06581fd20578dbb19c9768e941a1182e (diff)
downloadexternal_llvm-13af991aa22eabaf36be6acb70edd354d0242a89.tar.gz
external_llvm-13af991aa22eabaf36be6acb70edd354d0242a89.tar.bz2
external_llvm-13af991aa22eabaf36be6acb70edd354d0242a89.zip
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);