[polly] r373199 - [Alignment] Fix polly build
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 30 04:14:00 PDT 2019
Author: gchatelet
Date: Mon Sep 30 04:14:00 2019
New Revision: 373199
URL: http://llvm.org/viewvc/llvm-project?rev=373199&view=rev
Log:
[Alignment] Fix polly build
Modified:
polly/trunk/lib/CodeGen/BlockGenerators.cpp
polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=373199&r1=373198&r2=373199&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Mon Sep 30 04:14:00 2019
@@ -1061,7 +1061,7 @@ Value *VectorBlockGenerator::generateStr
LoadInst *VecLoad =
Builder.CreateLoad(VectorPtr, Load->getName() + "_p_vec_full");
if (!Aligned)
- VecLoad->setAlignment(8);
+ VecLoad->setAlignment(Align(8));
if (NegativeStride) {
SmallVector<Constant *, 16> Indices;
@@ -1089,7 +1089,7 @@ Value *VectorBlockGenerator::generateStr
Builder.CreateLoad(VectorPtr, Load->getName() + "_p_splat_one");
if (!Aligned)
- ScalarLoad->setAlignment(8);
+ ScalarLoad->setAlignment(Align(8));
Constant *SplatVector = Constant::getNullValue(
VectorType::get(Builder.getInt32Ty(), getVectorWidth()));
Modified: polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslNodeBuilder.cpp?rev=373199&r1=373198&r2=373199&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslNodeBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/IslNodeBuilder.cpp Mon Sep 30 04:14:00 2019
@@ -1213,7 +1213,8 @@ Value *IslNodeBuilder::preloadUnconditio
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.
More information about the llvm-commits
mailing list