summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/GVNSink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/GVNSink.cpp')
-rw-r--r--lib/Transforms/Scalar/GVNSink.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/GVNSink.cpp b/lib/Transforms/Scalar/GVNSink.cpp
index 5c75f39e381d..8634816e702f 100644
--- a/lib/Transforms/Scalar/GVNSink.cpp
+++ b/lib/Transforms/Scalar/GVNSink.cpp
@@ -169,8 +169,8 @@ struct SinkingInstructionCandidate {
NumExtraPHIs) // PHIs are expensive, so make sure they're worth it.
- SplitEdgeCost;
}
- bool operator>=(const SinkingInstructionCandidate &Other) const {
- return Cost >= Other.Cost;
+ bool operator>(const SinkingInstructionCandidate &Other) const {
+ return Cost > Other.Cost;
}
};
@@ -745,7 +745,7 @@ unsigned GVNSink::sinkBB(BasicBlock *BBEnd) {
std::stable_sort(
Candidates.begin(), Candidates.end(),
[](const SinkingInstructionCandidate &A,
- const SinkingInstructionCandidate &B) { return A >= B; });
+ const SinkingInstructionCandidate &B) { return A > B; });
DEBUG(dbgs() << " -- Sinking candidates:\n"; for (auto &C
: Candidates) dbgs()
<< " " << C << "\n";);