8287432: C2: assert(tn->in(0) != __null) failed: must have live top node

Reviewed-by: kvn, thartmann
This commit is contained in:
Christian Hagedorn 2022-06-08 14:12:09 +00:00
parent f7791ad0ea
commit 78d371266a
2 changed files with 56 additions and 1 deletions

View file

@ -3664,7 +3664,7 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f
n->set_req(MemBarNode::Precedent, top());
while (wq.size() > 0) {
Node* m = wq.pop();
if (m->outcnt() == 0) {
if (m->outcnt() == 0 && m != top()) {
for (uint j = 0; j < m->req(); j++) {
Node* in = m->in(j);
if (in != NULL) {