Index: llvm/lib/IR/Verifier.cpp =================================================================== --- llvm/lib/IR/Verifier.cpp +++ llvm/lib/IR/Verifier.cpp @@ -3429,16 +3429,16 @@ if (auto *GEPVTy = dyn_cast(GEP.getType())) { // Additional checks for vector GEPs. - unsigned GEPWidth = GEPVTy->getNumElements(); + ElementCount GEPWidth = GEPVTy->getElementCount(); if (GEP.getPointerOperandType()->isVectorTy()) Assert( GEPWidth == - cast(GEP.getPointerOperandType())->getNumElements(), + cast(GEP.getPointerOperandType())->getElementCount(), "Vector GEP result width doesn't match operand's", &GEP); for (Value *Idx : Idxs) { Type *IndexTy = Idx->getType(); if (auto *IndexVTy = dyn_cast(IndexTy)) { - unsigned IndexWidth = IndexVTy->getNumElements(); + ElementCount IndexWidth = IndexVTy->getElementCount(); Assert(IndexWidth == GEPWidth, "Invalid GEP index vector width", &GEP); } Assert(IndexTy->isIntOrIntVectorTy(),