[llvm] 84810e1 - Revert "Use a stable-sort when combining bases"

Sterling Augustine via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 09:54:38 PDT 2022


Author: Sterling Augustine
Date: 2022-03-17T09:54:13-07:00
New Revision: 84810e1f7467ecbb3f14e70eb68d4e9aea5efc46

URL: https://github.com/llvm/llvm-project/commit/84810e1f7467ecbb3f14e70eb68d4e9aea5efc46
DIFF: https://github.com/llvm/llvm-project/commit/84810e1f7467ecbb3f14e70eb68d4e9aea5efc46.diff

LOG: Revert "Use a stable-sort when combining bases"

This reverts commit 81417261a15f46284f2613118120d7d6de2bc02d.

Added: 
    

Modified: 
    llvm/lib/Target/ARM/ARMISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index f0e3b988642a7..583b6b8afb5f3 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -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();


        


More information about the llvm-commits mailing list