diff options
author | Junmo Park <junmoz.park@samsung.com> | 2016-01-28 06:23:33 +0000 |
---|---|---|
committer | Junmo Park <junmoz.park@samsung.com> | 2016-01-28 06:23:33 +0000 |
commit | b3327b700747d02ddc9e33cc47754e995b15717c (patch) | |
tree | cf731e15ff2f64fefa7ae27d3976ae390ee60e4a /llvm/lib/CodeGen/SelectionDAG | |
parent | 208ee5a09da49ad1f5fea60a3e12f6ac9ed6f709 (diff) | |
download | bcm5719-llvm-b3327b700747d02ddc9e33cc47754e995b15717c.tar.gz bcm5719-llvm-b3327b700747d02ddc9e33cc47754e995b15717c.zip |
[DAGCombiner] Don't add volatile or indexed stores to ChainedStores
Summary:
findBetterNeighborChains does not handle volatile or indexed stores.
However, it did not check when adding stores to ChainedStores.
Reviewers: arsenm
Differential Revision: http://reviews.llvm.org/D16463
llvm-svn: 259024
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 35801474e1c..fea77d0f216 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -14756,6 +14756,10 @@ bool DAGCombiner::findBetterNeighborChains(StoreSDNode* St) { while (true) { if (StoreSDNode *STn = dyn_cast<StoreSDNode>(NextInChain)) { // We found a store node. Use it for the next iteration. + if (STn->isVolatile() || STn->isIndexed()) { + Index = nullptr; + break; + } ChainedStores.push_back(STn); Index = STn; break; |