Index: llvm/lib/IR/Function.cpp =================================================================== --- llvm/lib/IR/Function.cpp +++ llvm/lib/IR/Function.cpp @@ -1180,8 +1180,10 @@ case IITDescriptor::Quad: return !Ty->isFP128Ty(); case IITDescriptor::Integer: return !Ty->isIntegerTy(D.Integer_Width); case IITDescriptor::Vector: { + // TODO: It would be nice if we could assert that we'd seen + // a ScalableVecArgument prior to this for ScalableVectorTypes VectorType *VT = dyn_cast(Ty); - return !VT || VT->getNumElements() != D.Vector_Width || + return !VT || VT->getElementCount().Min != D.Vector_Width || matchIntrinsicType(VT->getElementType(), Infos, ArgTys, DeferredChecks, IsDeferredCheck); }