summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/IslNodeBuilder.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2019-09-30 11:14:00 +0000
committerGuillaume Chatelet <gchatelet@google.com>2019-09-30 11:14:00 +0000
commit725efb35c785eab056ef64213ec4d0de84f75433 (patch)
treef37950a4eb85046eab40a8ae5832f6917d699f73 /polly/lib/CodeGen/IslNodeBuilder.cpp
parent3ca270f05b0bdd2f921498e0841618e697316d7b (diff)
downloadbcm5719-llvm-725efb35c785eab056ef64213ec4d0de84f75433.tar.gz
bcm5719-llvm-725efb35c785eab056ef64213ec4d0de84f75433.zip
[Alignment] Fix polly build
llvm-svn: 373199
Diffstat (limited to 'polly/lib/CodeGen/IslNodeBuilder.cpp')
-rw-r--r--polly/lib/CodeGen/IslNodeBuilder.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp
index 13d61694c54..17e41b4d806 100644
--- a/polly/lib/CodeGen/IslNodeBuilder.cpp
+++ b/polly/lib/CodeGen/IslNodeBuilder.cpp
@@ -1213,7 +1213,8 @@ Value *IslNodeBuilder::preloadUnconditionally(isl_set *AccessRange,
Ptr = Builder.CreatePointerCast(Ptr, Ty->getPointerTo(AS), Name + ".cast");
PreloadVal = Builder.CreateLoad(Ptr, Name + ".load");
if (LoadInst *PreloadInst = dyn_cast<LoadInst>(PreloadVal))
- PreloadInst->setAlignment(dyn_cast<LoadInst>(AccInst)->getAlignment());
+ PreloadInst->setAlignment(
+ MaybeAlign(dyn_cast<LoadInst>(AccInst)->getAlignment()));
// TODO: This is only a hot fix for SCoP sequences that use the same load
// instruction contained and hoisted by one of the SCoPs.
OpenPOWER on IntegriCloud