# HG changeset patch # User kvn # Date 1417657307 28800 # Node ID 3f4a5fdca31864f08eddeca56a1a7cf95270e70d # Parent f913964f3fde85c42ab7da376c3f7d56589c26d5 8066649: 8u backport for 8065618 is incorrect Summary: The new code in 8u backport should guard the execution of the following code instead of return. Reviewed-by: iveresov diff -r f913964f3fde -r 3f4a5fdca318 src/share/vm/opto/ifg.cpp --- a/src/share/vm/opto/ifg.cpp Tue Dec 02 12:24:31 2014 -0800 +++ b/src/share/vm/opto/ifg.cpp Wed Dec 03 17:41:47 2014 -0800 @@ -541,6 +541,7 @@ if( !n->is_Proj() || // Could also be a flags-projection of a dead ADD or such. (_lrg_map.live_range_id(def) && !liveout.member(_lrg_map.live_range_id(def)))) { + bool remove = true; if (n->is_MachProj()) { // Don't remove KILL projections if their "defining" nodes have // memory effects (have SCMemProj projection node) - @@ -553,21 +554,24 @@ for (uint i = 0; i < cnt; i++) { Node* proj = def->raw_out(i); if (proj->Opcode() == Op_SCMemProj) { - return false; + remove = false; + break; } } } - block->remove_node(j - 1); - if (lrgs(r)._def == n) { - lrgs(r)._def = 0; + if (remove) { + block->remove_node(j - 1); + if (lrgs(r)._def == n) { + lrgs(r)._def = 0; + } + n->disconnect_inputs(NULL, C); + _cfg.unmap_node_from_block(n); + n->replace_by(C->top()); + // Since yanking a Node from block, high pressure moves up one + hrp_index[0]--; + hrp_index[1]--; + continue; } - n->disconnect_inputs(NULL, C); - _cfg.unmap_node_from_block(n); - n->replace_by(C->top()); - // Since yanking a Node from block, high pressure moves up one - hrp_index[0]--; - hrp_index[1]--; - continue; } // Fat-projections kill many registers which cannot be used to