[llvm] ac6219d - Revert "[DAGCombiner] fix comments for D138899; NFC"
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 13 19:07:39 PST 2023
Author: Arthur Eubanks
Date: 2023-02-13T19:07:27-08:00
New Revision: ac6219d0aeb7e3d2cd17ca4961a51649f0a297b2
URL: https://github.com/llvm/llvm-project/commit/ac6219d0aeb7e3d2cd17ca4961a51649f0a297b2
DIFF: https://github.com/llvm/llvm-project/commit/ac6219d0aeb7e3d2cd17ca4961a51649f0a297b2.diff
LOG: Revert "[DAGCombiner] fix comments for D138899; NFC"
This reverts commit 63854f91d3ee1056796a5ef27753648396cac6ec.
Dependent commit to be reverted.
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 ce269004000f8..f4f82db4c9b1e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -362,10 +362,6 @@ namespace {
SDValue SplitIndexingFromLoad(LoadSDNode *LD);
bool SliceUpLoad(SDNode *N);
- // Looks up the chain to find a unique (unaliased) store feeding the passed
- // load. If no such store is found, returns a nullptr.
- // Note: This will look past a CALLSEQ_START if the load is chained to it so
- // so that it can find stack stores for byval params.
StoreSDNode *getUniqueStoreFeeding(LoadSDNode *LD, int64_t &Offset);
// Scalars have size 0 to distinguish from singleton vectors.
SDValue ForwardStoreValueToDirectLoad(LoadSDNode *LD);
@@ -17636,14 +17632,14 @@ StoreSDNode *DAGCombiner::getUniqueStoreFeeding(LoadSDNode *LD,
continue;
BaseIndexOffset BasePtrLD = BaseIndexOffset::match(LD, DAG);
BaseIndexOffset BasePtrST = BaseIndexOffset::match(Store, DAG);
- if (!BasePtrST.equalBaseIndex(BasePtrLD, DAG, Offset))
- continue;
- // Make sure the store is not aliased with any nodes in TokenFactor.
- GatherAllAliases(Store, Chain, Aliases);
- if (Aliases.empty() ||
- (Aliases.size() == 1 && Aliases.front().getNode() == Store))
- ST = Store;
- break;
+ if (BasePtrST.equalBaseIndex(BasePtrLD, DAG, Offset)) {
+ // Make sure the store is not aliased with any nodes in TokenFactor.
+ GatherAllAliases(Store, Chain, Aliases);
+ if (Aliases.empty() ||
+ (Aliases.size() == 1 && Aliases.front().getNode() == Store))
+ ST = Store;
+ break;
+ }
}
} else {
StoreSDNode *Store = dyn_cast<StoreSDNode>(Chain.getNode());
More information about the llvm-commits
mailing list