8222738: Shenandoah: assert(is_Proj()) failed when running cometd benchmarks

Reviewed-by: rkennke
This commit is contained in:
Roland Westrelin 2019-05-02 20:47:23 +02:00
parent 8b07b191c3
commit 852cee4c6b

View File

@ -1333,8 +1333,8 @@ void ShenandoahBarrierC2Support::pin_and_expand(PhaseIdealLoop* phase) {
} }
} }
} }
if (ctrl->is_Proj() && ctrl->in(0)->is_CallJava()) { if ((ctrl->is_Proj() && ctrl->in(0)->is_CallJava()) || ctrl->is_CallJava()) {
CallNode* call = ctrl->in(0)->as_CallJava(); CallNode* call = ctrl->is_Proj() ? ctrl->in(0)->as_CallJava() : ctrl->as_CallJava();
CallProjections projs; CallProjections projs;
call->extract_projections(&projs, false, false); call->extract_projections(&projs, false, false);
@ -1362,7 +1362,7 @@ void ShenandoahBarrierC2Support::pin_and_expand(PhaseIdealLoop* phase) {
if (idx < n->outcnt()) { if (idx < n->outcnt()) {
Node* u = n->raw_out(idx); Node* u = n->raw_out(idx);
Node* c = phase->ctrl_or_self(u); Node* c = phase->ctrl_or_self(u);
if (c == ctrl) { if (phase->is_dominator(call, c) && phase->is_dominator(c, projs.fallthrough_proj)) {
stack.set_index(idx+1); stack.set_index(idx+1);
assert(!u->is_CFG(), ""); assert(!u->is_CFG(), "");
stack.push(u, 0); stack.push(u, 0);
@ -1404,14 +1404,11 @@ void ShenandoahBarrierC2Support::pin_and_expand(PhaseIdealLoop* phase) {
} }
} }
} else { } else {
// assert(n_clone->outcnt() > 0, "");
// assert(n->outcnt() > 0, "");
stack.pop(); stack.pop();
clones.pop(); clones.pop();
} }
} while (stack.size() > 0); } while (stack.size() > 0);
assert(stack.size() == 0 && clones.size() == 0, ""); assert(stack.size() == 0 && clones.size() == 0, "");
ctrl = projs.fallthrough_catchproj;
} }
} }