diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-01 00:02:31 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-01 00:02:31 +0000 |
commit | 7bdf0060a00f04ad03d3c6f294d8db6f4951dbc2 (patch) | |
tree | f6d9a5025a17e2ecaaf63653e7c675929458d26d /lib/CodeGen/RegAllocGreedy.cpp | |
parent | a7dd4dfccab3ab5b2a7f187baf6522a93d9acab2 (diff) |
Update split candidate correctly when interference cache is full.
No test case, spotted by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocGreedy.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocGreedy.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp index f54a2c85d1..71b7f4f785 100644 --- a/lib/CodeGen/RegAllocGreedy.cpp +++ b/lib/CodeGen/RegAllocGreedy.cpp @@ -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) |