Skip to content

Commit 7aed9b6

Browse files
committedNov 25, 2020
8256016: Dacapo24H.java failed with "assert(false) failed: unscheduable graph"
Reviewed-by: kvn, vlivanov
1 parent 26e6cb3 commit 7aed9b6

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed
 

‎src/hotspot/share/opto/ifnode.cpp

+17-1
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,23 @@ Node* IfNode::simple_subsuming(PhaseIterGVN* igvn) {
16051605
}
16061606
#endif
16071607
// Replace condition with constant True(1)/False(0).
1608-
set_req(1, igvn->intcon(br == tb ? 1 : 0));
1608+
bool is_always_true = br == tb;
1609+
set_req(1, igvn->intcon(is_always_true ? 1 : 0));
1610+
1611+
// Update any data dependencies to the directly dominating test. This subsumed test is not immediately removed by igvn
1612+
// and therefore subsequent optimizations might miss these data dependencies otherwise. There might be a dead loop
1613+
// ('always_taken_proj' == 'pre') that is cleaned up later. Skip this case to make the iterator work properly.
1614+
Node* always_taken_proj = proj_out(is_always_true);
1615+
if (always_taken_proj != pre) {
1616+
for (DUIterator_Fast imax, i = always_taken_proj->fast_outs(imax); i < imax; i++) {
1617+
Node* u = always_taken_proj->fast_out(i);
1618+
if (!u->is_CFG()) {
1619+
igvn->replace_input_of(u, 0, pre);
1620+
--i;
1621+
--imax;
1622+
}
1623+
}
1624+
}
16091625

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

0 commit comments

Comments
 (0)
Please sign in to comment.