Skip to content

Commit 52ec983

Browse files
committed
Make wrong preallocated arg count verifier error clearer
Reviewers: rnk Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79128
1 parent 7a80139 commit 52ec983

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

llvm/lib/IR/Verifier.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4507,8 +4507,9 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
45074507
}
45084508
Assert(NumArgs->equalsInt(NumPreallocatedArgs),
45094509
"llvm.call.preallocated.setup arg size must be equal to number "
4510-
"of arguments "
4511-
"at call site");
4510+
"of preallocated arguments "
4511+
"at call site",
4512+
Call, *UseCall);
45124513
// getOperandBundle() cannot be called if more than one of the operand
45134514
// bundle exists. There is already a check elsewhere for this, so skip
45144515
// here if we see more than one.

llvm/test/Verifier/preallocated-invalid.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ define void @preallocated_require_bundle() {
9898
ret void
9999
}
100100

101-
; CHECK: arg size must be equal to number of arguments
101+
; CHECK: arg size must be equal to number of preallocated arguments
102102
define void @preallocated_num_args() {
103103
%cs = call token @llvm.call.preallocated.setup(i32 3)
104104
%x = call i8* @llvm.call.preallocated.arg(token %cs, i32 0) preallocated(i32)

0 commit comments

Comments
 (0)