summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2019-10-21 15:48:42 +0000
committerGuillaume Chatelet <gchatelet@google.com>2019-10-21 15:48:42 +0000
commit22755e4ea8fcb0e6f5b4fd0cbfcdff2a3dcf87a3 (patch)
tree98825a22acd9d89f847466607a068df8675b70c3
parentd499d1cedfe460f6e2aa8fcbadc8c784fa960d26 (diff)
downloadbcm5719-llvm-22755e4ea8fcb0e6f5b4fd0cbfcdff2a3dcf87a3.tar.gz
bcm5719-llvm-22755e4ea8fcb0e6f5b4fd0cbfcdff2a3dcf87a3.zip
Fix Polly
llvm-svn: 375421
-rw-r--r--polly/lib/Analysis/ScopBuilder.cpp8
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp4
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) &&
OpenPOWER on IntegriCloud