diff options
-rw-r--r-- | polly/lib/Analysis/ScopBuilder.cpp | 8 | ||||
-rw-r--r-- | polly/lib/Analysis/ScopDetection.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/polly/lib/Analysis/ScopBuilder.cpp b/polly/lib/Analysis/ScopBuilder.cpp index db7bea19176..61efbef96ae 100644 --- a/polly/lib/Analysis/ScopBuilder.cpp +++ b/polly/lib/Analysis/ScopBuilder.cpp @@ -2890,7 +2890,7 @@ isl::set ScopBuilder::getNonHoistableCtx(MemoryAccess *Access, auto &DL = scop->getFunction().getParent()->getDataLayout(); if (isSafeToLoadUnconditionally(LI->getPointerOperand(), LI->getType(), - LI->getAlignment(), DL)) { + MaybeAlign(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 @@ -2940,9 +2940,9 @@ 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)) + if (!isDereferenceableAndAlignedPointer( + LInst->getPointerOperand(), LInst->getType(), + MaybeAlign(LInst->getAlignment()), DL)) return false; // If the location might be overwritten we do not hoist it unconditionally. diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index da4b9bb1797..f57174f675d 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -468,8 +468,8 @@ bool ScopDetection::onlyValidRequiredInvariantLoads( for (auto NonAffineRegion : Context.NonAffineSubRegionSet) { if (isSafeToLoadUnconditionally(Load->getPointerOperand(), - Load->getType(), Load->getAlignment(), - DL)) + Load->getType(), + MaybeAlign(Load->getAlignment()), DL)) continue; if (NonAffineRegion->contains(Load) && |