Fix Polly

llvm-svn: 375421
This commit is contained in:
Guillaume Chatelet 2019-10-21 15:48:42 +00:00
parent d499d1cedf
commit 22755e4ea8
2 changed files with 6 additions and 6 deletions

View File

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

View File

@ -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) &&