{"record":{"id":"38f7655143c96217","repo":"openjdk/jdk","slug":"warning-total-d-unused-operands","errorCode":null,"errorMessage":"\n-------Warning: total %d unused operands\n","messagePattern":"\n-------Warning: total (.+?) unused operands\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/hotspot/share/adlc/archDesc.cpp","lineNumber":780,"sourceCode":"  callback.do_form_by_name(\"vecY\");\n  callback.do_form_by_name(\"vecZ\");\n  callback.do_form_by_name(\"legVecS\");\n  callback.do_form_by_name(\"legVecD\");\n  callback.do_form_by_name(\"legVecX\");\n  callback.do_form_by_name(\"legVecY\");\n  callback.do_form_by_name(\"legVecZ\");\n#endif\n\n  int cnt = 0;\n  _operands.reset();\n  OperandForm* operand;\n  for ( ; (operand = (OperandForm*)_operands.iter()) != nullptr; ) {\n    if(visited.find(operand) == visited.end() && !operand->ideal_only()) {\n      fprintf(stderr, \"\\nWarning: unused operand (%s)\", operand->_ident);\n      cnt++;\n    }\n  }\n  if (cnt) fprintf(stderr, \"\\n-------Warning: total %d unused operands\\n\", cnt);\n\n  return true;\n}\n\nvoid ArchDesc::dump() {\n  _pre_header.dump();\n  _header.dump();\n  _source.dump();\n  if (_register) _register->dump();\n  fprintf(stderr,\"\\n\");\n  fprintf(stderr,\"------------------ Dump Operands ---------------------\\n\");\n  _operands.dump();\n  fprintf(stderr,\"\\n\");\n  fprintf(stderr,\"------------------ Dump Operand Classes --------------\\n\");\n  _opclass.dump();\n  fprintf(stderr,\"\\n\");\n  fprintf(stderr,\"------------------ Dump Attributes  ------------------\\n\");\n  _attributes.dump();","sourceCodeStart":762,"sourceCodeEnd":798,"githubUrl":"https://github.com/openjdk/jdk/blob/88dfb74bbeefcf2b0aa11835183bcd949998fc8f/src/hotspot/share/adlc/archDesc.cpp#L762-L798","documentation":"Closing line of ADLC's unused-operand lint: after listing each unused operand individually (see [96]), it prints '\\n-------Warning: total %d unused operands' with the aggregate count. Purely informational; indicates how many definitions in the preceding list to clean up. Build continues.","triggerScenarios":"End of ArchDesc's check_after_parse()/operand usage verification when cnt > 0 — i.e. at least one operand was never visited by the form-callback walk.","commonSituations":"Same as [96]: experimental or ported .ad files with leftover operand definitions.","solutions":["Treat the count as a checklist: clean up that many definitions per the individual warnings above","Silence by using or removing each operand; verify count drops to zero on rebuild"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"cnt=$(make adlc 2>&1 | grep -oP '(?<=total )\\d+(?= unused operands)' || true); [ \"${cnt:-0}\" -gt 0 ] && echo \"clean up $cnt operands\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Drive cleanups by the per-operand warnings above the total line","Keep the count trending to zero in your own .ad files"],"tags":["adlc","unused-operand","warnings","build","hotspot"],"backgroundTag":null,"analyzedSha":"88dfb74bbeefcf2b0aa11835183bcd949998fc8f","analyzedAt":"2026-08-14T11:45:09.665Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}