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

Reviewed-by: kvn, thartmann
  • Loading branch information
tobiasholenstein committed Feb 17, 2023
1 parent 57c9bc3 commit cd77fcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/opto/loopTransform.cpp
Expand Up @@ -2278,8 +2278,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

3 comments on commit cd77fcf

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on cd77fcf Apr 26, 2023

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on cd77fcf Apr 26, 2023

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch GoeLin-backport-cd77fcfb in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit cd77fcfb from the openjdk/jdk repository.

The commit being backported was authored by Tobias Holenstein on 17 Feb 2023 and was reviewed by Vladimir Kozlov and Tobias Hartmann.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev.git GoeLin-backport-cd77fcfb:GoeLin-backport-cd77fcfb
$ git checkout GoeLin-backport-cd77fcfb
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev.git GoeLin-backport-cd77fcfb

Please sign in to comment.