diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -4507,8 +4507,9 @@ } Assert(NumArgs->equalsInt(NumPreallocatedArgs), "llvm.call.preallocated.setup arg size must be equal to number " - "of arguments " - "at call site"); + "of preallocated arguments " + "at call site", + Call, *UseCall); // getOperandBundle() cannot be called if more than one of the operand // bundle exists. There is already a check elsewhere for this, so skip // here if we see more than one. diff --git a/llvm/test/Verifier/preallocated-invalid.ll b/llvm/test/Verifier/preallocated-invalid.ll --- a/llvm/test/Verifier/preallocated-invalid.ll +++ b/llvm/test/Verifier/preallocated-invalid.ll @@ -98,7 +98,7 @@ ret void } -; CHECK: arg size must be equal to number of arguments +; CHECK: arg size must be equal to number of preallocated arguments define void @preallocated_num_args() { %cs = call token @llvm.call.preallocated.setup(i32 3) %x = call i8* @llvm.call.preallocated.arg(token %cs, i32 0) preallocated(i32)