diff options
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp b/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp index 05bf8c6baaf..f438aae9d1d 100644 --- a/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp @@ -666,12 +666,8 @@ Vectorizer::collectInstructions(BasicBlock *BB) { unsigned AS = Ptr->getType()->getPointerAddressSpace(); unsigned VecRegSize = TTI.getLoadStoreVecRegBitWidth(AS); - unsigned VF = VecRegSize / TySize; - VectorType *VecTy = dyn_cast<VectorType>(Ty); - // No point in looking at these if they're too big to vectorize. - if (TySize > VecRegSize / 2 || - (VecTy && TTI.getLoadVectorFactor(VF, TySize, TySize / 8, VecTy) == 0)) + if (TySize > VecRegSize / 2) continue; // Make sure all the users of a vector are constant-index extracts. @@ -713,12 +709,8 @@ Vectorizer::collectInstructions(BasicBlock *BB) { unsigned AS = Ptr->getType()->getPointerAddressSpace(); unsigned VecRegSize = TTI.getLoadStoreVecRegBitWidth(AS); - unsigned VF = VecRegSize / TySize; - VectorType *VecTy = dyn_cast<VectorType>(Ty); - // No point in looking at these if they're too big to vectorize. - if (TySize > VecRegSize / 2 || - (VecTy && TTI.getStoreVectorFactor(VF, TySize, TySize / 8, VecTy) == 0)) + if (TySize > VecRegSize / 2) continue; if (isa<VectorType>(Ty) && !llvm::all_of(SI->users(), [](const User *U) { |