[llvm] r213453 - [LoopVectorize] Use CreateAligned(Load|Store)
Hal Finkel
hfinkel at anl.gov
Sat Jul 19 06:39:45 PDT 2014
Author: hfinkel
Date: Sat Jul 19 08:39:45 2014
New Revision: 213453
URL: http://llvm.org/viewvc/llvm-project?rev=213453&view=rev
Log:
[LoopVectorize] Use CreateAligned(Load|Store)
IRBuilder has CreateAligned(Load|Store) functions; use them and we don't need
to make a second call to setAlignment.
No functionality change intended.
Modified:
llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=213453&r1=213452&r2=213453&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Sat Jul 19 08:39:45 2014
@@ -1762,8 +1762,8 @@ void InnerLoopVectorizer::vectorizeMemor
Value *VecPtr = Builder.CreateBitCast(PartPtr,
DataTy->getPointerTo(AddressSpace));
- StoreInst *NewSI = Builder.CreateStore(StoredVal[Part], VecPtr);
- NewSI->setAlignment(Alignment);
+ StoreInst *NewSI =
+ Builder.CreateAlignedStore(StoredVal[Part], VecPtr, Alignment);
propagateMetadata(NewSI, SI);
}
return;
@@ -1785,8 +1785,7 @@ void InnerLoopVectorizer::vectorizeMemor
Value *VecPtr = Builder.CreateBitCast(PartPtr,
DataTy->getPointerTo(AddressSpace));
- LoadInst *NewLI = Builder.CreateLoad(VecPtr, "wide.load");
- NewLI->setAlignment(Alignment);
+ LoadInst *NewLI = Builder.CreateAlignedLoad(VecPtr, Alignment, "wide.load");
propagateMetadata(NewLI, LI);
Entry[Part] = Reverse ? reverseVector(NewLI) : NewLI;
}
More information about the llvm-commits
mailing list