8237086: assert(is_MachReturn()) running CTW with fix for JDK-8231291

Reviewed-by: kvn, vlivanov
This commit is contained in:
Roland Westrelin 2020-01-14 14:58:17 +01:00
parent 00c40ae1e3
commit 1745ae28b9
2 changed files with 8 additions and 0 deletions

View File

@ -2191,6 +2191,11 @@ void Compile::remove_root_to_sfpts_edges(PhaseIterGVN& igvn) {
--i;
}
}
// Parsing may have added top inputs to the root node (Path
// leading to the Halt node proven dead). Make sure we get a
// chance to clean them up.
igvn._worklist.push(r);
igvn.optimize();
}
}

View File

@ -1406,6 +1406,9 @@ Node* GraphKit::cast_not_null(Node* obj, bool do_replace_in_map) {
// opts so the test goes away and the compiled code doesn't execute a
// useless check.
Node* GraphKit::must_be_not_null(Node* value, bool do_replace_in_map) {
if (!TypePtr::NULL_PTR->higher_equal(_gvn.type(value))) {
return value;
}
Node* chk = _gvn.transform(new CmpPNode(value, null()));
Node *tst = _gvn.transform(new BoolNode(chk, BoolTest::ne));
Node* opaq = _gvn.transform(new Opaque4Node(C, tst, intcon(1)));