forked from OSchip/llvm-project
Revert "Use a stable-sort when combining bases"
This reverts commit 81417261a1
.
This commit is contained in:
parent
8522a01e84
commit
84810e1f74
|
@ -15977,10 +15977,10 @@ static SDValue CombineBaseUpdate(SDNode *N,
|
|||
// Try to fold with other users. Non-constant updates are considered
|
||||
// first, and constant updates are sorted to not break a sequence of
|
||||
// strided accesses (if there is any).
|
||||
std::stable_sort(BaseUpdates.begin(), BaseUpdates.end(),
|
||||
[](BaseUpdateUser &LHS, BaseUpdateUser &RHS) {
|
||||
return LHS.ConstInc < RHS.ConstInc;
|
||||
});
|
||||
std::sort(BaseUpdates.begin(), BaseUpdates.end(),
|
||||
[](BaseUpdateUser &LHS, BaseUpdateUser &RHS) {
|
||||
return LHS.ConstInc < RHS.ConstInc;
|
||||
});
|
||||
for (BaseUpdateUser &User : BaseUpdates) {
|
||||
if (TryCombineBaseUpdate(Target, User, /*SimpleConstIncOnly=*/false, DCI))
|
||||
return SDValue();
|
||||
|
|
Loading…
Reference in New Issue