# HG changeset patch # User thartmann # Date 1418283869 -3600 # Thu Dec 11 08:44:29 2014 +0100 # Node ID 1afbf9a724dfbe829f9113e79d4eb359349590e9 # Parent 810e47461d4f725ba645ad88c87c86a4edd6e39e 8066763: DESCRIPTION Summary: SUMMARY Reviewed-by: kvn diff --git a/src/share/vm/opto/lcm.cpp b/src/share/vm/opto/lcm.cpp --- a/src/share/vm/opto/lcm.cpp +++ b/src/share/vm/opto/lcm.cpp @@ -417,8 +417,15 @@ for (DUIterator_Last i2min, i2 = old_tst->last_outs(i2min); i2 >= i2min; --i2) old_tst->last_out(i2)->set_req(0, nul_chk); // Clean-up any dead code - for (uint i3 = 0; i3 < old_tst->req(); i3++) + for (uint i3 = 0; i3 < old_tst->req(); i3++) { + Node* req = old_tst->in(i3); old_tst->set_req(i3, NULL); + if (req->outcnt() == 0) { + // Remove dead input node + req->disconnect_inputs(NULL, C); + block->find_remove(req); + } + } latency_from_uses(nul_chk); latency_from_uses(best);