Skip to content

Commit

Permalink
8290822: C2: assert in PhaseIdealLoop::do_unroll() is subject to unde…
Browse files Browse the repository at this point in the history
…fined behavior

Backport-of: cd77fcfb5f9156e5f0909fa15a842dde6c25c66a
  • Loading branch information
GoeLin committed Apr 27, 2023
1 parent 48632e5 commit 241c066
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/opto/loopTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2149,8 +2149,8 @@ void PhaseIdealLoop::do_unroll(IdealLoopTree *loop, Node_List &old_new, bool adj

// Verify that policy_unroll result is still valid.
const TypeInt* limit_type = _igvn.type(limit)->is_int();
assert(stride_con > 0 && ((limit_type->_hi - stride_con) < limit_type->_hi) ||
stride_con < 0 && ((limit_type->_lo - stride_con) > limit_type->_lo),
assert((stride_con > 0 && ((min_jint + stride_con) <= limit_type->_hi)) ||
(stride_con < 0 && ((max_jint + stride_con) >= limit_type->_lo)),
"sanity");

if (limit->is_Con()) {
Expand Down

1 comment on commit 241c066

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.