mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Add tie-breaker for register class sorting in getSuperRegForSubReg
llvm::stable_sort is apparently not sufficient. Use the same tie-breaker/sorting style as TopoOrderRC fix bot failures. E.g. http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/19401/steps/test-check-all/logs/stdio llvm-svn: 370267
This commit is contained in:
parent
608a928360
commit
9c177a174f
@ -329,7 +329,14 @@ CodeGenTarget::getSuperRegForSubReg(const ValueTypeByHwMode &ValueTy,
|
|||||||
// Find and return the largest of our candidate classes.
|
// Find and return the largest of our candidate classes.
|
||||||
llvm::stable_sort(Candidates, [&](const CodeGenRegisterClass *A,
|
llvm::stable_sort(Candidates, [&](const CodeGenRegisterClass *A,
|
||||||
const CodeGenRegisterClass *B) {
|
const CodeGenRegisterClass *B) {
|
||||||
return A->getMembers().size() > B->getMembers().size();
|
if (A->getMembers().size() > B->getMembers().size())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (A->getMembers().size() < B->getMembers().size())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Order by name as a tie-breaker.
|
||||||
|
return StringRef(A->getName()) < B->getName();
|
||||||
});
|
});
|
||||||
|
|
||||||
return Candidates[0];
|
return Candidates[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user