aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2009-11-19 19:09:39 +0000
committerDavid Greene <greened@obbligato.org>2009-11-19 19:09:39 +0000
commitfeb5bfbc6b7c565ad47cf5015482d559b0a7651f (patch)
tree1780b5ad140ba54d6330e4a06a34718e8c60b8c8 /lib/CodeGen
parentdab249b3b762cff0ff16069b3233e4c885e75347 (diff)
downloadexternal_llvm-feb5bfbc6b7c565ad47cf5015482d559b0a7651f.zip
external_llvm-feb5bfbc6b7c565ad47cf5015482d559b0a7651f.tar.gz
external_llvm-feb5bfbc6b7c565ad47cf5015482d559b0a7651f.tar.bz2
Fix a small bug.
Fix one case we missed to make sure we reserve registers from allocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/RegAllocLinearScan.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp
index be1fa08..4d6b689 100644
--- a/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/lib/CodeGen/RegAllocLinearScan.cpp
@@ -1435,7 +1435,7 @@ unsigned RALinScan::getFreePhysReg(LiveInterval* cur,
if (SkipDGRegs && DowngradedRegs.count(Reg))
continue;
if (isRegAvail(Reg) && Reg < inactiveCounts.size() &&
- FreeRegInactiveCount < inactiveCounts[Reg]) {
+ FreeRegInactiveCount < inactiveCounts[Reg] && !isRecentlyUsed(Reg)) {
FreeReg = Reg;
FreeRegInactiveCount = inactiveCounts[Reg];
if (FreeRegInactiveCount == MaxInactiveCount)