diff options
Diffstat (limited to 'polly/lib/Analysis/ScopBuilder.cpp')
-rw-r--r-- | polly/lib/Analysis/ScopBuilder.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/polly/lib/Analysis/ScopBuilder.cpp b/polly/lib/Analysis/ScopBuilder.cpp index 6b75a820d7a..8ae29e223a7 100644 --- a/polly/lib/Analysis/ScopBuilder.cpp +++ b/polly/lib/Analysis/ScopBuilder.cpp @@ -1435,8 +1435,8 @@ isl::set ScopBuilder::getNonHoistableCtx(MemoryAccess *Access, isl::set SafeToLoad; auto &DL = scop->getFunction().getParent()->getDataLayout(); - if (isSafeToLoadUnconditionally(LI->getPointerOperand(), LI->getAlignment(), - DL)) { + if (isSafeToLoadUnconditionally(LI->getPointerOperand(), LI->getType(), + LI->getAlignment(), DL)) { SafeToLoad = isl::set::universe(AccessRelation.get_space().range()); } else if (BB != LI->getParent()) { // Skip accesses in non-affine subregions as they might not be executed @@ -1487,6 +1487,7 @@ bool ScopBuilder::canAlwaysBeHoisted(MemoryAccess *MA, // TODO: We can provide more information for better but more expensive // results. if (!isDereferenceableAndAlignedPointer(LInst->getPointerOperand(), + LInst->getType(), LInst->getAlignment(), DL)) return false; |