Skip to content

Commit cb69be0

Browse files
committed
fix wrong argument for isIdentityMask
1 parent e6525d9 commit cb69be0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3116,7 +3116,7 @@ bool VectorCombine::foldInsExtVectorToShuffle(Instruction &I) {
31163116
if (!NeedExpOrNarrow) {
31173117
// Ignore 'free' identity insertion shuffle.
31183118
// TODO: getShuffleCost should return TCC_Free for Identity shuffles.
3119-
if (!ShuffleVectorInst::isIdentityMask(Mask, NumDstElts))
3119+
if (!ShuffleVectorInst::isIdentityMask(Mask, NumSrcElts))
31203120
NewCost += TTI.getShuffleCost(SK, DstVecTy, Mask, CostKind, 0, nullptr,
31213121
{DstVec, SrcVec});
31223122
} else {

0 commit comments

Comments
 (0)