Update split candidate correctly when interference cache is full.

No test case, spotted by inspection.

llvm-svn: 143407
This commit is contained in:
Jakob Stoklund Olesen 2011-11-01 00:02:31 +00:00
parent dc05741b6e
commit 7b1107fe0e

View File

@ -1118,6 +1118,8 @@ unsigned RAGreedy::tryRegionSplit(LiveInterval &VirtReg, AllocationOrder &Order,
}
--NumCands;
GlobalCand[Worst] = GlobalCand[NumCands];
if (BestCand == NumCands)
BestCand = Worst;
}
if (GlobalCand.size() <= NumCands)