Skip to content

Commit

Permalink
8256016: Dacapo24H.java failed with "assert(false) failed: unscheduab…
Browse files Browse the repository at this point in the history
…le graph"

Reviewed-by: kvn, vlivanov
  • Loading branch information
chhagedorn committed Nov 25, 2020
1 parent 26e6cb3 commit 7aed9b6
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/hotspot/share/opto/ifnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,23 @@ Node* IfNode::simple_subsuming(PhaseIterGVN* igvn) {
}
#endif
// Replace condition with constant True(1)/False(0).
set_req(1, igvn->intcon(br == tb ? 1 : 0));
bool is_always_true = br == tb;
set_req(1, igvn->intcon(is_always_true ? 1 : 0));

// Update any data dependencies to the directly dominating test. This subsumed test is not immediately removed by igvn
// and therefore subsequent optimizations might miss these data dependencies otherwise. There might be a dead loop
// ('always_taken_proj' == 'pre') that is cleaned up later. Skip this case to make the iterator work properly.
Node* always_taken_proj = proj_out(is_always_true);
if (always_taken_proj != pre) {
for (DUIterator_Fast imax, i = always_taken_proj->fast_outs(imax); i < imax; i++) {
Node* u = always_taken_proj->fast_out(i);
if (!u->is_CFG()) {
igvn->replace_input_of(u, 0, pre);
--i;
--imax;
}
}
}

if (bol->outcnt() == 0) {
igvn->remove_dead_node(bol); // Kill the BoolNode.
Expand Down

0 comments on commit 7aed9b6

Please sign in to comment.