1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

[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
This commit is contained in:
Nirav Dave 2017-12-20 19:06:47 +00:00
parent 552fbc5607
commit bb6eab85ac

View File

@ -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 =