diff --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp --- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp +++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp @@ -757,7 +757,9 @@ for (unsigned i = 0, e = fnType.getNumInputs(); i != e; ++i) if (op.getOperand(i).getType() != fnType.getInput(i)) - return op.emitOpError("operand type mismatch"); + return op.emitOpError("operand ") << i << " type mismatch between " << + op.getOperand(i).getType() << " and declared type " << + fnType.getInput(i); if (fnType.getNumResults() != op.getNumResults()) return op.emitOpError("incorrect number of results for callee");