[llvm] 20c85fd - [DAGCombiner] simplify bool return in getStoreMergeCandidates; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 12:45:20 PDT 2020
Author: Sanjay Patel
Date: 2020-08-17T15:37:55-04:00
New Revision: 20c85fd1ab0f064163957a2cf76c20992d514005
URL: https://github.com/llvm/llvm-project/commit/20c85fd1ab0f064163957a2cf76c20992d514005
DIFF: https://github.com/llvm/llvm-project/commit/20c85fd1ab0f064163957a2cf76c20992d514005.diff
LOG: [DAGCombiner] simplify bool return in getStoreMergeCandidates; NFC
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 0b2e9184695b..8ad19e7b539f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -16133,7 +16133,7 @@ void DAGCombiner::getStoreMergeCandidates(
int64_t &Offset) -> bool {
// The memory operands must not be volatile/indexed/atomic.
// TODO: May be able to relax for unordered atomics (see D66309)
- if (!Other->isSimple() || Other->isIndexed())
+ if (!Other->isSimple() || Other->isIndexed())
return false;
// Don't mix temporal stores with non-temporal stores.
if (St->isNonTemporal() != Other->isNonTemporal())
@@ -16195,11 +16195,9 @@ void DAGCombiner::getStoreMergeCandidates(
auto OverLimitInDependenceCheck = [&](SDNode *StoreNode,
SDNode *RootNode) -> bool {
auto RootCount = StoreRootCountMap.find(StoreNode);
- if (RootCount != StoreRootCountMap.end() &&
- RootCount->second.first == RootNode &&
- RootCount->second.second > StoreMergeDependenceLimit)
- return true;
- return false;
+ return RootCount != StoreRootCountMap.end() &&
+ RootCount->second.first == RootNode &&
+ RootCount->second.second > StoreMergeDependenceLimit;
};
// We looking for a root node which is an ancestor to all mergable
More information about the llvm-commits
mailing list