[llvm] r305473 - [DAG] Defer Pre/Post IndexStore merge to after mergestore. NFCI.
Nirav Dave via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 08:05:48 PDT 2017
Author: niravd
Date: Thu Jun 15 10:05:48 2017
New Revision: 305473
URL: http://llvm.org/viewvc/llvm-project?rev=305473&view=rev
Log:
[DAG] Defer Pre/Post IndexStore merge to after mergestore. NFCI.
In preparation for doing storemerge post-legalization, reorder
visitSTORE passes to move pre/post-index combining after store
merge. Reordered passes other than store merge are unaffected.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=305473&r1=305472&r2=305473&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Jun 15 10:05:48 2017
@@ -13218,10 +13218,6 @@ SDValue DAGCombiner::visitSTORE(SDNode *
Chain = ST->getChain();
}
- // Try transforming N to an indexed store.
- if (CombineToPreIndexedLoadStore(N) || CombineToPostIndexedLoadStore(N))
- return SDValue(N, 0);
-
// FIXME: is there such a thing as a truncating indexed store?
if (ST->isTruncatingStore() && ST->isUnindexed() &&
Value.getValueType().isInteger()) {
@@ -13316,6 +13312,10 @@ SDValue DAGCombiner::visitSTORE(SDNode *
}
}
+ // Try transforming N to an indexed store.
+ if (CombineToPreIndexedLoadStore(N) || CombineToPostIndexedLoadStore(N))
+ return SDValue(N, 0);
+
// Turn 'store float 1.0, Ptr' -> 'store int 0x12345678, Ptr'
//
// Make sure to do this only after attempting to merge stores in order to
More information about the llvm-commits
mailing list