aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan-Kuan Chen <hankuan.chen@sifive.com>2024-06-20 20:09:28 +0800
committerGitHub <noreply@github.com>2024-06-20 20:09:28 +0800
commitbe339fd99deea6633d35777fee5f60f42236983c (patch)
tree6e110fb526c30928eb2ebb05714c00e0199dba6f
parent89841137fbb3686673b86af3434bf3ba12993d6d (diff)
downloadllvm-be339fd99deea6633d35777fee5f60f42236983c.zip
llvm-be339fd99deea6633d35777fee5f60f42236983c.tar.gz
llvm-be339fd99deea6633d35777fee5f60f42236983c.tar.bz2
[SLP] NFC. Reduce redundant assignment. (#96149)
-rw-r--r--llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index ae0819c..b5f6edb 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -9060,17 +9060,15 @@ BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals,
}
if (!isValidElementType(ScalarTy))
return InstructionCost::getInvalid();
- auto *VecTy = FixedVectorType::get(ScalarTy, VL.size());
TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput;
// If we have computed a smaller type for the expression, update VecTy so
// that the costs will be accurate.
auto It = MinBWs.find(E);
Type *OrigScalarTy = ScalarTy;
- if (It != MinBWs.end()) {
+ if (It != MinBWs.end())
ScalarTy = IntegerType::get(F->getContext(), It->second.first);
- VecTy = FixedVectorType::get(ScalarTy, VL.size());
- }
+ auto *VecTy = FixedVectorType::get(ScalarTy, VL.size());
unsigned EntryVF = E->getVectorFactor();
auto *FinalVecTy = FixedVectorType::get(ScalarTy, EntryVF);