Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/hotspot/share/opto/loopnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,10 +830,6 @@ bool PhaseIdealLoop::create_loop_nest(IdealLoopTree* loop, Node_List &old_new) {
return false;
}

// May not have gone thru igvn yet so don't use _igvn.type(phi) (PhaseIdealLoop::is_counted_loop() sets the iv phi's type)
const TypeInteger* phi_t = phi->bottom_type()->is_integer(bt);
assert(phi_t->hi_as_long() >= phi_t->lo_as_long(), "dead phi?");
iters_limit = checked_cast<int>(MIN2((julong)iters_limit, (julong)(phi_t->hi_as_long() - phi_t->lo_as_long())));

IfNode* exit_test = head->loopexit();
BoolTest::mask mask = exit_test->as_BaseCountedLoopEnd()->test_trip();
Expand All @@ -851,6 +847,11 @@ bool PhaseIdealLoop::create_loop_nest(IdealLoopTree* loop, Node_List &old_new) {
}
}

// May not have gone thru igvn yet so don't use _igvn.type(phi) (PhaseIdealLoop::is_counted_loop() sets the iv phi's type)
const TypeInteger* phi_t = phi->bottom_type()->is_integer(bt);
assert(phi_t->hi_as_long() >= phi_t->lo_as_long(), "dead phi?");
iters_limit = checked_cast<int>(MIN2((julong)iters_limit, (julong)(phi_t->hi_as_long() - phi_t->lo_as_long())));

// We need a safepoint to insert empty predicates for the inner loop.
SafePointNode* safepoint;
if (bt == T_INT && head->as_CountedLoop()->is_strip_mined()) {
Expand Down