diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp index 417f828013f..d8881689678 100644 --- a/src/hotspot/share/opto/compile.cpp +++ b/src/hotspot/share/opto/compile.cpp @@ -5014,16 +5014,7 @@ void Compile::remove_speculative_types(PhaseIterGVN &igvn) { const Type* t_no_spec = t->remove_speculative(); if (t_no_spec != t) { bool in_hash = igvn.hash_delete(n); -#ifdef ASSERT - if (!in_hash) { - tty->print_cr("current graph:"); - n->dump_bfs(MaxNodeLimit, nullptr, "S$"); - tty->cr(); - tty->print_cr("erroneous node:"); - n->dump(); - assert(false, "node should be in igvn hash table"); - } -#endif + assert(in_hash || n->hash() == Node::NO_HASH, "node should be in igvn hash table"); tn->set_type(t_no_spec); igvn.hash_insert(n); igvn._worklist.push(n); // give it a chance to go away