--- old/src/hotspot/share/opto/loopUnswitch.cpp 2018-05-16 09:40:14.664267454 +0200 +++ new/src/hotspot/share/opto/loopUnswitch.cpp 2018-05-16 09:40:08.549285202 +0200 @@ -138,9 +138,19 @@ Node* uniqc = proj_true->unique_ctrl_out(); Node* entry = head->skip_strip_mined()->in(LoopNode::EntryControl); Node* predicate = find_predicate(entry); + if (predicate != NULL) { + entry = skip_loop_predicates(entry); + } if (predicate != NULL && UseLoopPredicate) { // We may have two predicates, find first. - entry = find_predicate(entry->in(0)->in(0)); + Node* n = find_predicate(entry); + if (n != NULL) { + predicate = n; + entry = skip_loop_predicates(entry); + } + } + if (predicate != NULL && UseProfiledLoopPredicate) { + entry = find_predicate(entry); if (entry != NULL) predicate = entry; } if (predicate != NULL) predicate = predicate->in(0);