File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1676,6 +1676,10 @@ bool PhaseIdealLoop::safe_for_if_replacement(const Node* dom) const {
16761676// like various versions of induction variable+offset. Clone the
16771677// computation per usage to allow it to sink out of the loop.
16781678void PhaseIdealLoop::try_sink_out_of_loop (Node* n) {
1679+ bool is_raw_to_oop_cast = n->is_ConstraintCast () &&
1680+ n->in (1 )->bottom_type ()->isa_rawptr () &&
1681+ !n->bottom_type ()->isa_rawptr ();
1682+
16791683 if (has_ctrl (n) &&
16801684 !n->is_Phi () &&
16811685 !n->is_Bool () &&
@@ -1685,7 +1689,9 @@ void PhaseIdealLoop::try_sink_out_of_loop(Node* n) {
16851689 !n->is_OpaqueNotNull () &&
16861690 !n->is_OpaqueInitializedAssertionPredicate () &&
16871691 !n->is_OpaqueTemplateAssertionPredicate () &&
1688- !n->is_Type ()) {
1692+ !is_raw_to_oop_cast && // don't extend live ranges of raw oops
1693+ (KillPathsReachableByDeadTypeNode || !n->is_Type ())
1694+ ) {
16891695 Node *n_ctrl = get_ctrl (n);
16901696 IdealLoopTree *n_loop = get_loop (n_ctrl);
16911697
You can’t perform that action at this time.
0 commit comments