diff options
author | Nirav Dave <niravd@google.com> | 2017-12-20 19:06:47 +0000 |
---|---|---|
committer | Nirav Dave <niravd@google.com> | 2017-12-20 19:06:47 +0000 |
commit | a869856c6020d8135901f93fd696c2fdd00854ea (patch) | |
tree | d8e5f216bed6c62b01bd61e61334efc92ca23b89 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | 3fd1b1a764c856c11748619ca5fecf5b22ef0880 (diff) | |
download | bcm5719-llvm-a869856c6020d8135901f93fd696c2fdd00854ea.tar.gz bcm5719-llvm-a869856c6020d8135901f93fd696c2fdd00854ea.zip |
[DAG] Fix condition on overlapping store check.
Prevent overlapping store elision when overlapping store is
pre-inc/dec as analysis is wrong in these cases.
llvm-svn: 321204
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 2dbcc1f8fa5..e751e1aedad 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -13786,8 +13786,8 @@ SDValue DAGCombiner::visitSTORE(SDNode *N) { // Deal with elidable overlapping chained stores. if (StoreSDNode *ST1 = dyn_cast<StoreSDNode>(Chain)) - if (OptLevel != CodeGenOpt::None && ST1->isUnindexed() && - !ST1->isVolatile() && ST1->hasOneUse() && + if (OptLevel != CodeGenOpt::None && ST->isUnindexed() && + ST1->isUnindexed() && !ST1->isVolatile() && ST1->hasOneUse() && !ST1->getBasePtr().isUndef() && !ST->isVolatile()) { BaseIndexOffset STBasePtr = BaseIndexOffset::match(ST->getBasePtr(), DAG); BaseIndexOffset ST1BasePtr = |