[llvm] 6af7c13 - [LoopVectorize] getStepVector - reduce scope of local variable. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 10 12:44:33 PST 2022
Author: Simon Pilgrim
Date: 2022-02-10T20:44:25Z
New Revision: 6af7c1371abf551389457b9ccb4ce50d8de2c7ea
URL: https://github.com/llvm/llvm-project/commit/6af7c1371abf551389457b9ccb4ce50d8de2c7ea
DIFF: https://github.com/llvm/llvm-project/commit/6af7c1371abf551389457b9ccb4ce50d8de2c7ea.diff
LOG: [LoopVectorize] getStepVector - reduce scope of local variable. NFC.
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 54c3089c62fd6..e13149864a130 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2343,9 +2343,8 @@ static Value *getStepVector(Value *Val, Value *StartIdx, Value *Step,
// Create a vector of consecutive numbers from zero to VF.
VectorType *InitVecValVTy = ValVTy;
- Type *InitVecValSTy = STy;
if (STy->isFloatingPointTy()) {
- InitVecValSTy =
+ Type *InitVecValSTy =
IntegerType::get(STy->getContext(), STy->getScalarSizeInBits());
InitVecValVTy = VectorType::get(InitVecValSTy, VLen);
}
More information about the llvm-commits
mailing list