Skip to content

Commit

Permalink
[DAGCombiner] simplify bool return in getStoreMergeCandidates; NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
rotateright committed Aug 17, 2020
1 parent 52cd8f1 commit 20c85fd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 20c85fd

Please sign in to comment.