Skip to content

Commit c89d511

Browse files
committed
[SLP]Use It->second.first for BWSz, NFC.
1 parent a8364c9 commit c89d511

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9364,7 +9364,7 @@ InstructionCost BoUpSLP::getTreeCost(ArrayRef<Value *> VectorizedVals) {
93649364
VectorCasts
93659365
.insert(std::make_pair(ScalarTE, FTy->getElementType()))
93669366
.second) {
9367-
unsigned BWSz = It->second.second;
9367+
unsigned BWSz = It->second.first;
93689368
unsigned DstBWSz = DL->getTypeSizeInBits(FTy->getElementType());
93699369
unsigned VecOpcode;
93709370
if (DstBWSz < BWSz)
@@ -9376,7 +9376,7 @@ InstructionCost BoUpSLP::getTreeCost(ArrayRef<Value *> VectorizedVals) {
93769376
InstructionCost C = TTI->getCastInstrCost(
93779377
VecOpcode, FTy,
93789378
FixedVectorType::get(
9379-
IntegerType::get(FTy->getContext(), It->second.first),
9379+
IntegerType::get(FTy->getContext(), BWSz),
93809380
FTy->getNumElements()),
93819381
TTI::CastContextHint::None, CostKind);
93829382
LLVM_DEBUG(dbgs() << "SLP: Adding cost " << C

0 commit comments

Comments
 (0)