diff --git a/llvm/lib/IR/IntrinsicInst.cpp b/llvm/lib/IR/IntrinsicInst.cpp --- a/llvm/lib/IR/IntrinsicInst.cpp +++ b/llvm/lib/IR/IntrinsicInst.cpp @@ -299,7 +299,8 @@ }; Value *VPMask = getMaskParam(); - assert(VPMask && "No mask param?"); + if (!VPMask) + return GetVectorLengthOfType(getType()); return GetVectorLengthOfType(VPMask->getType()); }