diff options
author | Nirav Dave <niravd@google.com> | 2017-06-15 15:05:48 +0000 |
---|---|---|
committer | Nirav Dave <niravd@google.com> | 2017-06-15 15:05:48 +0000 |
commit | be2674a59818729703a541ecf83c68e3983e5460 (patch) | |
tree | f603908393127ef410db3235b1a94cc19820bf8a /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | 4d432b2c6bf89ace98641d0fcbf39cb6d52488ae (diff) | |
download | bcm5719-llvm-be2674a59818729703a541ecf83c68e3983e5460.tar.gz bcm5719-llvm-be2674a59818729703a541ecf83c68e3983e5460.zip |
[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.
llvm-svn: 305473
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 3a9c17045c1..4b1895b18d0 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -13218,10 +13218,6 @@ SDValue DAGCombiner::visitSTORE(SDNode *N) { 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 *N) { } } + // 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 |