aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/VectorUtils.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-05-17 22:14:42 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-05-17 22:19:15 +0200
commit52e98f620caf29f75c6d41f51a45610c26f68c65 (patch)
tree00e7ef3cc5936bb9e266a98a18065d4a0605bea0 /llvm/lib/Analysis/VectorUtils.cpp
parentfde8eb00e1466cecd0fc6697f8c2ab837c5b7cf3 (diff)
downloadllvm-52e98f620caf29f75c6d41f51a45610c26f68c65.zip
llvm-52e98f620caf29f75c6d41f51a45610c26f68c65.tar.gz
llvm-52e98f620caf29f75c6d41f51a45610c26f68c65.tar.bz2
[Alignment] Remove unnecessary getValueOrABITypeAlignment calls (NFC)
Now that load/store alignment is required, we no longer need most of them. Also switch the getLoadStoreAlignment() helper to return Align instead of MaybeAlign.
Diffstat (limited to 'llvm/lib/Analysis/VectorUtils.cpp')
-rw-r--r--llvm/lib/Analysis/VectorUtils.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp
index 4c2f900..2276c1f 100644
--- a/llvm/lib/Analysis/VectorUtils.cpp
+++ b/llvm/lib/Analysis/VectorUtils.cpp
@@ -946,13 +946,8 @@ void InterleavedAccessInfo::collectConstStrideAccesses(
const SCEV *Scev = replaceSymbolicStrideSCEV(PSE, Strides, Ptr);
PointerType *PtrTy = cast<PointerType>(Ptr->getType());
uint64_t Size = DL.getTypeAllocSize(PtrTy->getElementType());
-
- // An alignment of 0 means target ABI alignment.
- MaybeAlign Alignment = MaybeAlign(getLoadStoreAlignment(&I));
- if (!Alignment)
- Alignment = Align(DL.getABITypeAlignment(PtrTy->getElementType()));
-
- AccessStrideInfo[&I] = StrideDescriptor(Stride, Scev, Size, *Alignment);
+ AccessStrideInfo[&I] = StrideDescriptor(Stride, Scev, Size,
+ getLoadStoreAlignment(&I));
}
}