Revert "Use a stable-sort when combining bases"

This reverts commit 81417261a1.
This commit is contained in:
Sterling Augustine 2022-03-17 09:53:40 -07:00
parent 8522a01e84
commit 84810e1f74
1 changed files with 4 additions and 4 deletions

View File

@ -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();