Skip to content

Commit 59d99c9

Browse files
fhahnaaryanshukla
authored andcommitted
[LV] Add missing check, drop 'then'.
Address post-commit comments for 67f4968.
1 parent 1d14489 commit 59d99c9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7003,10 +7003,11 @@ LoopVectorizationCostModel::getInstructionCost(Instruction *I,
70037003
VectorTy->isVectorTy() ? ToVectorTy(SrcScalarTy, VF) : SrcScalarTy;
70047004

70057005
if (canTruncateToMinimalBitwidth(I, VF)) {
7006-
// If the result type is <= then the source type, there will be no extend
7006+
// If the result type is <= the source type, there will be no extend
70077007
// after truncating the users to the minimal required bitwidth.
70087008
if (VectorTy->getScalarSizeInBits() <= SrcVecTy->getScalarSizeInBits() &&
7009-
(I->getOpcode() == Instruction::ZExt || I->getOpcode()))
7009+
(I->getOpcode() == Instruction::ZExt ||
7010+
I->getOpcode() == Instruction::SExt))
70107011
return 0;
70117012
}
70127013

0 commit comments

Comments
 (0)