1.1 --- a/src/share/vm/opto/reg_split.cpp Fri Oct 11 12:06:14 2013 +0200 1.2 +++ b/src/share/vm/opto/reg_split.cpp Fri Oct 18 10:50:17 2013 +0200 1.3 @@ -51,15 +51,6 @@ 1.4 1.5 static const char out_of_nodes[] = "out of nodes during split"; 1.6 1.7 -static bool contains_no_live_range_input(const Node* def) { 1.8 - for (uint i = 1; i < def->req(); ++i) { 1.9 - if (def->in(i) != NULL && def->in_RegMask(i).is_NotEmpty()) { 1.10 - return false; 1.11 - } 1.12 - } 1.13 - return true; 1.14 -} 1.15 - 1.16 //------------------------------get_spillcopy_wide----------------------------- 1.17 // Get a SpillCopy node with wide-enough masks. Use the 'wide-mask', the 1.18 // wide ideal-register spill-mask if possible. If the 'wide-mask' does 1.19 @@ -326,12 +317,11 @@ 1.20 if( def->req() > 1 ) { 1.21 for( uint i = 1; i < def->req(); i++ ) { 1.22 Node *in = def->in(i); 1.23 - // Check for single-def (LRG cannot redefined) 1.24 uint lidx = _lrg_map.live_range_id(in); 1.25 - if (lidx >= _lrg_map.max_lrg_id()) { 1.26 - continue; // Value is a recent spill-copy 1.27 - } 1.28 - if (lrgs(lidx).is_singledef()) { 1.29 + // We do not need this for live ranges that are only defined once. 1.30 + // However, this is not true for spill copies that are added in this 1.31 + // Split() pass, since they might get coalesced later on in this pass. 1.32 + if (lidx < _lrg_map.max_lrg_id() && lrgs(lidx).is_singledef()) { 1.33 continue; 1.34 } 1.35 1.36 @@ -1327,7 +1317,7 @@ 1.37 Node *def = Reaches[pidx][slidx]; 1.38 assert( def, "must have reaching def" ); 1.39 // If input up/down sense and reg-pressure DISagree 1.40 - if (def->rematerialize() && contains_no_live_range_input(def)) { 1.41 + if (def->rematerialize()) { 1.42 // Place the rematerialized node above any MSCs created during 1.43 // phi node splitting. end_idx points at the insertion point 1.44 // so look at the node before it.