From 4dd0d07a7e573f6d3ef5aac872a18cf529197f56 Mon Sep 17 00:00:00 2001 From: thartmann Date: Mon, 21 Dec 2015 10:14:26 +0100 Subject: [PATCH] 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 --- src/share/vm/opto/loopTransform.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/share/vm/opto/loopTransform.cpp b/src/share/vm/opto/loopTransform.cpp index f3f291d2b..a6a7ab088 100644 --- a/src/share/vm/opto/loopTransform.cpp +++ b/src/share/vm/opto/loopTransform.cpp @@ -1739,6 +1739,12 @@ bool PhaseIdealLoop::is_scaled_iv_plus_offset(Node* exp, Node* iv, int* p_scale, } 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 && -- GitLab