diff options
author | David Greene <greened@obbligato.org> | 2009-11-19 19:09:39 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2009-11-19 19:09:39 +0000 |
commit | feb5bfbc6b7c565ad47cf5015482d559b0a7651f (patch) | |
tree | 1780b5ad140ba54d6330e4a06a34718e8c60b8c8 /lib/CodeGen/RegAllocLinearScan.cpp | |
parent | dab249b3b762cff0ff16069b3233e4c885e75347 (diff) |
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/RegAllocLinearScan.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index be1fa08cfa..4d6b6891f0 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) |