Skip to content

Commit

Permalink
Revert "Use a stable-sort when combining bases"
Browse files Browse the repository at this point in the history
This reverts commit 8141726.
  • Loading branch information
Sterling-Augustine committed Mar 17, 2022
1 parent 8522a01 commit 84810e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions llvm/lib/Target/ARM/ARMISelLowering.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 84810e1

Please sign in to comment.