From: David Greene Date: Thu, 19 Nov 2009 19:09:39 +0000 (+0000) Subject: Fix a small bug. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=feb5bfbc6b7c565ad47cf5015482d559b0a7651f;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index be1fa08cfa0..4d6b6891f0d 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)