# HG changeset patch # User thartmann # Date 1450689266 -3600 # Node ID 192643caadcab8a9e650ccee6201310032fe9b6e # Parent 501f014415d89764c66ef3e443786e3c1fe9633a 8145754: PhaseIdealLoop::is_scaled_iv_plus_offset() does not match AddI Summary: is_scaled_iv_plus_offset() should handle AddI nodes with scaled iv as second input. Reviewed-by: kvn diff -r 501f014415d8 -r 192643caadca src/share/vm/opto/loopTransform.cpp --- a/src/share/vm/opto/loopTransform.cpp Mon Dec 21 11:34:58 2015 +0100 +++ b/src/share/vm/opto/loopTransform.cpp Mon Dec 21 10:14:26 2015 +0100 @@ -1739,6 +1739,12 @@ } return true; } + if (is_scaled_iv(exp->in(2), iv, p_scale)) { + if (p_offset != NULL) { + *p_offset = exp->in(1); + } + return true; + } if (exp->in(2)->is_Con()) { Node* offset2 = NULL; if (depth < 2 &&