[llvm] c2624b5 - [NFC] Use stable_sort to fix the basic-block-sections-code-prefetch.l test. (#191941)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 21:54:13 PDT 2026
Author: Rahman Lavaee
Date: 2026-04-14T04:54:07Z
New Revision: c2624b5205b81516047792147e9dc50f55c22e18
URL: https://github.com/llvm/llvm-project/commit/c2624b5205b81516047792147e9dc50f55c22e18
DIFF: https://github.com/llvm/llvm-project/commit/c2624b5205b81516047792147e9dc50f55c22e18.diff
LOG: [NFC] Use stable_sort to fix the basic-block-sections-code-prefetch.l test. (#191941)
This fixes https://lab.llvm.org/buildbot/#/builders/187/builds/18954.
Added:
Modified:
llvm/lib/CodeGen/InsertCodePrefetch.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/InsertCodePrefetch.cpp b/llvm/lib/CodeGen/InsertCodePrefetch.cpp
index 7e06db3974f69..789f7ba9a1021 100644
--- a/llvm/lib/CodeGen/InsertCodePrefetch.cpp
+++ b/llvm/lib/CodeGen/InsertCodePrefetch.cpp
@@ -112,7 +112,7 @@ insertPrefetchHints(MachineFunction &MF,
// Sort prefetch hints by their callsite index so we can insert them by one
// pass over the block's instructions.
for (auto &[SiteBBID, Hints] : PrefetchHintsBySiteBBID) {
- llvm::sort(Hints, [](const PrefetchHint &H1, const PrefetchHint &H2) {
+ llvm::stable_sort(Hints, [](const PrefetchHint &H1, const PrefetchHint &H2) {
return H1.SiteID.CallsiteIndex < H2.SiteID.CallsiteIndex;
});
}
More information about the llvm-commits
mailing list