[PATCH] D62193: [MergeICmps] Make sorting strongly stable on the rhs.
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 10:56:03 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL361281: [MergeICmps] Make sorting strongly stable on the rhs. (authored by courbet, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D62193?vs=200490&id=200544#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62193/new/
https://reviews.llvm.org/D62193
Files:
llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp
Index: llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp
+++ llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp
@@ -507,7 +507,8 @@
// semantics because we are only accessing dereferencable memory.
llvm::sort(Comparisons_,
[](const BCECmpBlock &LhsBlock, const BCECmpBlock &RhsBlock) {
- return LhsBlock.Lhs() < RhsBlock.Lhs();
+ return std::tie(LhsBlock.Lhs(), LhsBlock.Rhs()) <
+ std::tie(RhsBlock.Lhs(), RhsBlock.Rhs());
});
#ifdef MERGEICMPS_DOT_ON
errs() << "AFTER REORDERING:\n\n";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62193.200544.patch
Type: text/x-patch
Size: 690 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190521/8fcc195f/attachment.bin>
More information about the llvm-commits
mailing list