Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
/ jdk20 Public archive

Commit

Permalink
8271600: C2: CheckCastPP which should closely follow Allocate is sunk…
Browse files Browse the repository at this point in the history
… of a loop

Reviewed-by: chagedorn, roland
  • Loading branch information
Vladimir Ivanov committed Aug 23, 2021
1 parent ad92033 commit 2ff4c01
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hotspot/share/opto/loopopts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1435,12 +1435,16 @@ void PhaseIdealLoop::split_if_with_blocks_post(Node *n) {
// like various versions of induction variable+offset. Clone the
// computation per usage to allow it to sink out of the loop.
void PhaseIdealLoop::try_sink_out_of_loop(Node* n) {
bool is_raw_to_oop_cast = n->is_ConstraintCast() &&
n->in(1)->bottom_type()->isa_rawptr() &&
!n->bottom_type()->isa_rawptr();
if (has_ctrl(n) &&
!n->is_Phi() &&
!n->is_Bool() &&
!n->is_Proj() &&
!n->is_MergeMem() &&
!n->is_CMove() &&
!is_raw_to_oop_cast && // don't extend live ranges of raw oops
n->Opcode() != Op_Opaque4) {
Node *n_ctrl = get_ctrl(n);
IdealLoopTree *n_loop = get_loop(n_ctrl);
Expand Down

0 comments on commit 2ff4c01

Please sign in to comment.