src/share/vm/opto/ifnode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/opto/ifnode.cpp

src/share/vm/opto/ifnode.cpp

Print this page
rev 8172 : 8078426: mb/jvm/compiler/InterfaceCalls/testAC2 - assert(predicate_proj == 0L) failed: only one predicate entry expected
Summary: split if finds predicates on several incoming paths when unswitched's loops are optimized out
Reviewed-by:

*** 232,251 **** PhaseGVN *phase = igvn; // Make a region merging constants and a region merging the rest uint req_c = 0; Node* predicate_proj = NULL; for (uint ii = 1; ii < r->req(); ii++) { if (phi->in(ii) == con1) { req_c++; } Node* proj = PhaseIdealLoop::find_predicate(r->in(ii)); if (proj != NULL) { ! assert(predicate_proj == NULL, "only one predicate entry expected"); predicate_proj = proj; } } Node* predicate_c = NULL; Node* predicate_x = NULL; bool counted_loop = r->is_CountedLoop(); Node *region_c = new RegionNode(req_c + 1); --- 232,259 ---- PhaseGVN *phase = igvn; // Make a region merging constants and a region merging the rest uint req_c = 0; Node* predicate_proj = NULL; + int nb_predicate_proj = 0; for (uint ii = 1; ii < r->req(); ii++) { if (phi->in(ii) == con1) { req_c++; } Node* proj = PhaseIdealLoop::find_predicate(r->in(ii)); if (proj != NULL) { ! nb_predicate_proj++; predicate_proj = proj; } } + if (nb_predicate_proj > 1) { + // Can happen in case of loop unswitching and when the loop is + // optimized out: it's not a loop anymore so we don't care about + // predicates. + assert(!r->is_Loop(), "this must not be a loop anymore"); + predicate_proj = NULL; + } Node* predicate_c = NULL; Node* predicate_x = NULL; bool counted_loop = r->is_CountedLoop(); Node *region_c = new RegionNode(req_c + 1);
src/share/vm/opto/ifnode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File