8321204: C2: assert(false) failed: node should be in igvn hash table

Reviewed-by: chagedorn, kvn
This commit is contained in:
Tobias Hartmann 2024-04-08 07:30:31 +00:00
parent 51b0abc874
commit d1aad71209

View File

@ -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