summaryrefslogtreecommitdiffstats
path: root/polly/lib/Transform/DeLICM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/Transform/DeLICM.cpp')
-rw-r--r--polly/lib/Transform/DeLICM.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/polly/lib/Transform/DeLICM.cpp b/polly/lib/Transform/DeLICM.cpp
index 72abb088845..7bcb0726632 100644
--- a/polly/lib/Transform/DeLICM.cpp
+++ b/polly/lib/Transform/DeLICM.cpp
@@ -1949,12 +1949,9 @@ private:
}
};
- // Add initial scalar. Either the value written by the store, or all inputs
- // of its statement.
- auto WrittenValUse = VirtualUse::create(
- S, TargetStoreMA->getAccessInstruction()->getOperandUse(0), LI, true);
- if (WrittenValUse.isInter())
- Worklist.push_back(WrittenValUse.getMemoryAccess());
+ auto *WrittenVal = TargetStoreMA->getAccessInstruction()->getOperand(0);
+ if (auto *WrittenValInputMA = TargetStmt->lookupInputAccessOf(WrittenVal))
+ Worklist.push_back(WrittenValInputMA);
else
ProcessAllIncoming(TargetStmt);
OpenPOWER on IntegriCloud