diff --git a/cranelift/codegen/meta/src/cdsl/xform.rs b/cranelift/codegen/meta/src/cdsl/xform.rs index b1a0234cd4..90d991f5e6 100644 --- a/cranelift/codegen/meta/src/cdsl/xform.rs +++ b/cranelift/codegen/meta/src/cdsl/xform.rs @@ -183,7 +183,12 @@ fn rewrite_expr( assert_eq!( apply_target.inst().operands_in.len(), dummy_args.len(), - "number of arguments in instruction is incorrect" + "number of arguments in instruction {} is incorrect\nexpected: {:?}", + apply_target.inst().name, + apply_target.inst().operands_in + .iter() + .map(|operand| format!("{}: {}", operand.name, operand.kind.name)) + .collect::>(), ); let mut args = Vec::new();