[Alignment][NFC] Instructions::getLoadStoreAlignment
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69256 llvm-svn: 375416
This commit is contained in:
@@ -741,9 +741,9 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
|
||||
// Arbitrarily try a vector of 2 elements.
|
||||
Type *VecTy = VectorType::get(T, /*NumElements=*/2);
|
||||
assert(VecTy && "did not find vectorized version of stored type");
|
||||
unsigned Alignment = getLoadStoreAlignment(ST);
|
||||
const MaybeAlign Alignment = getLoadStoreAlignment(ST);
|
||||
assert(Alignment && "Alignment should be set");
|
||||
if (!TTI->isLegalNTStore(VecTy, Align(Alignment))) {
|
||||
if (!TTI->isLegalNTStore(VecTy, *Alignment)) {
|
||||
reportVectorizationFailure(
|
||||
"nontemporal store instruction cannot be vectorized",
|
||||
"nontemporal store instruction cannot be vectorized",
|
||||
@@ -758,9 +758,9 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
|
||||
// supported on the target (arbitrarily try a vector of 2 elements).
|
||||
Type *VecTy = VectorType::get(I.getType(), /*NumElements=*/2);
|
||||
assert(VecTy && "did not find vectorized version of load type");
|
||||
unsigned Alignment = getLoadStoreAlignment(LD);
|
||||
const MaybeAlign Alignment = getLoadStoreAlignment(LD);
|
||||
assert(Alignment && "Alignment should be set");
|
||||
if (!TTI->isLegalNTLoad(VecTy, Align(Alignment))) {
|
||||
if (!TTI->isLegalNTLoad(VecTy, *Alignment)) {
|
||||
reportVectorizationFailure(
|
||||
"nontemporal load instruction cannot be vectorized",
|
||||
"nontemporal load instruction cannot be vectorized",
|
||||
|
||||
Reference in New Issue
Block a user