{"record":{"id":"558e0fc92b12b6f9","repo":"openjdk/jdk","slug":"ideal-node-missing-s","errorCode":null,"errorMessage":"Ideal node missing: %s\n","messagePattern":"Ideal node missing: (.+?)\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/hotspot/share/adlc/archDesc.cpp","lineNumber":484,"sourceCode":"// operands and instructions provide the result\nvoid ArchDesc::buildMatchList(MatchRule *mrule, const char *resultStr,\n                              const char *rootOp, Predicate *pred,\n                              const char *cost) {\n  const char *leftstr, *rightstr;\n  MatchNode  *mnode;\n\n  leftstr = rightstr = nullptr;\n  // Check for chain rule, and do not generate a match list for it\n  if ( mrule->is_chain_rule(_globalNames) ) {\n    return;\n  }\n\n  // Identify index position among ideal operands\n  intptr_t    index     = _last_opcode;\n  const char  *indexStr  = getMatchListIndex(*mrule);\n  index  = (intptr_t)_idealIndex[indexStr];\n  if (index == 0) {\n    fprintf(stderr, \"Ideal node missing: %s\\n\", indexStr);\n    assert(index != 0, \"Failed lookup of ideal node\\n\");\n  }\n\n  // Check that this will be placed appropriately in the DFA\n  if (index >= _last_opcode) {\n    fprintf(stderr, \"Invalid match rule %s <-- ( %s )\\n\",\n            resultStr ? resultStr : \" \",\n            rootOp    ? rootOp    : \" \");\n    assert(index < _last_opcode, \"Matching item not in ideal graph\\n\");\n    return;\n  }\n\n\n  // Walk the MatchRule, generating MatchList entries for each level\n  // of the rule (each nesting of parentheses)\n  // Check for \"Set\"\n  if (!strcmp(mrule->_opType, \"Set\")) {\n    mnode = mrule->_rChild;","sourceCodeStart":466,"sourceCodeEnd":502,"githubUrl":"https://github.com/openjdk/jdk/blob/88dfb74bbeefcf2b0aa11835183bcd949998fc8f/src/hotspot/share/adlc/archDesc.cpp#L466-L502","documentation":"ArchDesc::addForm/MatchRule processing error: the match rule's root operator (result type, looked up via getMatchListIndex and _idealIndex) has no index among the ideal (IR) nodes. The .ad file's match rule produces a node type that was never declared/registered as an ideal node, so ADLC cannot place the rule into the matcher DFA. An assert follows in debug builds of adlc; behavior is undefined in release adlc.","triggerScenarios":"A 'instruct' whose match result type or whose root operator in the match rule is misspelled or not an ideal node (e.g. matching a custom 'MyNode' that is not defined in the globals/ideal list). is_chain_rule() rules are exempt; everything else must resolve in _idealIndex.","commonSituations":"Adding a new ideal node but forgetting to register it in the global name table; typos in the match-rule root operator; porting .ad files when an ideal node was renamed between HotSpot versions.","solutions":["Check the spelling of the result/root operator named in the message against the ideal node list (globals, machine-independent match)","Register the new ideal node name before referencing it in match rules","If porting, map old ideal names to their current HotSpot equivalents"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# before building, check every match-rule result type is a known ideal name\ngrep -oP 'match\\(\\s*(\\w+)' src/hotspot/cpu/x86/x86.ad | sort -u | while read _ n; do grep -q \"\\b$n\\b\" src/hotspot/share/opto/classes.hpp || echo \"unknown result type: $n\"; done","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Register new ideal nodes in the global name table before using them in match rules","Spell-check result types against the ideal node list","Never ignore 'Ideal node missing' — the follow-on assert/behavior is worse"],"tags":["adlc","match-rule","ideal-node","build","hotspot"],"backgroundTag":null,"analyzedSha":"88dfb74bbeefcf2b0aa11835183bcd949998fc8f","analyzedAt":"2026-08-14T11:45:09.665Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}