Index: lib/Target/X86/Utils/X86ShuffleDecode.cpp =================================================================== --- lib/Target/X86/Utils/X86ShuffleDecode.cpp +++ lib/Target/X86/Utils/X86ShuffleDecode.cpp @@ -400,14 +400,14 @@ } void DecodeZeroExtendMask(MVT SrcVT, MVT DstVT, SmallVectorImpl &Mask) { - unsigned NumSrcElts = SrcVT.getVectorNumElements(); unsigned NumDstElts = DstVT.getVectorNumElements(); unsigned SrcScalarBits = SrcVT.getScalarSizeInBits(); unsigned DstScalarBits = DstVT.getScalarSizeInBits(); unsigned Scale = DstScalarBits / SrcScalarBits; assert(SrcScalarBits < DstScalarBits && "Expected zero extension mask to increase scalar size"); - assert(NumSrcElts >= NumDstElts && "Too many zero extension lanes"); + assert(SrcVT.getVectorNumElements() >= NumDstElts && + "Too many zero extension lanes"); for (unsigned i = 0; i != NumDstElts; i++) { Mask.push_back(i);