--- old/src/share/vm/opto/lcm.cpp 2014-12-11 08:43:33.669030365 +0100 +++ new/src/share/vm/opto/lcm.cpp 2014-12-11 08:43:33.589030368 +0100 @@ -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);