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 | 559d4dcc1657f4e997d34de67fe08fcbbbf8d36d (patch) | |
tree | 72331756f8c5f2ecbfaae427678936bf3f1e4015 /llvm/lib/CodeGen | |
parent | d28ddbff8d5911501d3020fd3d46ed86085580cb (diff) | |
download | bcm5719-llvm-559d4dcc1657f4e997d34de67fe08fcbbbf8d36d.tar.gz bcm5719-llvm-559d4dcc1657f4e997d34de67fe08fcbbbf8d36d.zip |
Update split candidate correctly when interference cache is full.
No test case, spotted by inspection.
llvm-svn: 143407
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocGreedy.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp index f54a2c85d10..71b7f4f7852 100644 --- a/llvm/lib/CodeGen/RegAllocGreedy.cpp +++ b/llvm/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) |