mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 06:33:21 +00:00
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213453 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2350e9f6b7
commit
4df656952a
@ -1762,8 +1762,8 @@ void InnerLoopVectorizer::vectorizeMemoryInstruction(Instruction *Instr) {
|
||||
|
||||
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::vectorizeMemoryInstruction(Instruction *Instr) {
|
||||
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user