aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2014-05-11 18:24:26 +0000
committerDimitry Andric <dim@FreeBSD.org>2014-05-11 18:24:26 +0000
commit68bcb7db193e4bc81430063148253d30a791023e (patch)
tree9f9245264c66971905eab3af40b7fc82e38fc2ad /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent512b84fc6c12bc496cef739e69bfaaf27e7ccc8e (diff)
downloadsrc-68bcb7db193e4bc81430063148253d30a791023e.tar.gz
src-68bcb7db193e4bc81430063148253d30a791023e.zip
Notes
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 43f72c5ef9b4..69cf8d9a909a 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -8547,7 +8547,10 @@ struct MemOpLink {
// base ptr.
struct ConsecutiveMemoryChainSorter {
bool operator()(MemOpLink LHS, MemOpLink RHS) {
- return LHS.OffsetFromBase < RHS.OffsetFromBase;
+ return
+ LHS.OffsetFromBase < RHS.OffsetFromBase ||
+ (LHS.OffsetFromBase == RHS.OffsetFromBase &&
+ LHS.SequenceNum > RHS.SequenceNum);
}
};