Index: llvm/include/llvm/IR/DerivedTypes.h =================================================================== --- llvm/include/llvm/IR/DerivedTypes.h +++ llvm/include/llvm/IR/DerivedTypes.h @@ -519,8 +519,7 @@ /// input type and the same element type. static VectorType *getDoubleElementsVectorType(VectorType *VTy) { auto EltCnt = VTy->getElementCount(); - assert((VTy->getNumElements() * 2ull) <= UINT_MAX && - "Too many elements in vector"); + assert((EltCnt.Min * 2ull) <= UINT_MAX && "Too many elements in vector"); return VectorType::get(VTy->getElementType(), EltCnt*2); }