Mercurial > hg > truffle
diff src/share/vm/opto/reg_split.cpp @ 12075:4b2838704fd5
8021898: Broken JIT compiler optimization for loop unswitching
Summary: fix method clone_projs() to clone all related MachProj nodes.
Reviewed-by: roland, adlertz
author | kvn |
---|---|
date | Fri, 16 Aug 2013 14:11:40 -0700 |
parents | adb9a7d94cb5 |
children | 650868c062a9 |
line wrap: on
line diff
--- a/src/share/vm/opto/reg_split.cpp Fri Aug 16 13:39:26 2013 -0400 +++ b/src/share/vm/opto/reg_split.cpp Fri Aug 16 14:11:40 2013 -0700 @@ -397,10 +397,15 @@ #endif // See if the cloned def kills any flags, and copy those kills as well uint i = insidx+1; - if( clone_projs( b, i, def, spill, maxlrg) ) { + int found_projs = clone_projs( b, i, def, spill, maxlrg); + if (found_projs > 0) { // Adjust the point where we go hi-pressure - if( i <= b->_ihrp_index ) b->_ihrp_index++; - if( i <= b->_fhrp_index ) b->_fhrp_index++; + if (i <= b->_ihrp_index) { + b->_ihrp_index += found_projs; + } + if (i <= b->_fhrp_index) { + b->_fhrp_index += found_projs; + } } return spill;