Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8314580: PhaseIdealLoop::transform_long_range_checks fails with assert "was tested before" #15411

Closed
wants to merge 1 commit into from

Conversation

rwestrel
Copy link
Contributor

@rwestrel rwestrel commented Aug 24, 2023

For long counted loops, PhaseIdealLoop::create_loop_nest() first
goes over the loop body to collect range checks, then transforms the
long counted loop into a loop nest and then goes over the list of
range checks it collected to transfrom them. For that last step,
PhaseIdealLoop::transform_long_range_checks() needs to extract the
parameters of the range check from the range check expression. It
should still recognize the range check expression even though the loop
was transformed in the meantime. That's what fails here. The reason is
that the range check expression uses the long loop increment as input
which, in the creation of the loop nest, is transformed to outer phi + inner incr. That breaks pattern matching of the range check
expression. I propose removing the transformation:

incr=>(outer_phi+inner_incr)

entireley. After looking at this code again, I don't think it's
needed. The transformation:

phi=>(outer_phi+inner_phi)

should be all that's needed to correctly transform the loop.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8314580: PhaseIdealLoop::transform_long_range_checks fails with assert "was tested before" (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15411/head:pull/15411
$ git checkout pull/15411

Update a local copy of the PR:
$ git checkout pull/15411
$ git pull https://git.openjdk.org/jdk.git pull/15411/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15411

View PR using the GUI difftool:
$ git pr show -t 15411

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15411.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 24, 2023

👋 Welcome back roland! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 24, 2023
@openjdk
Copy link

openjdk bot commented Aug 24, 2023

@rwestrel The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Aug 24, 2023
@mlbridge
Copy link

mlbridge bot commented Aug 24, 2023

Webrevs

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me.

@openjdk
Copy link

openjdk bot commented Aug 30, 2023

@rwestrel This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8314580: PhaseIdealLoop::transform_long_range_checks fails with assert "was tested before"

Reviewed-by: chagedorn, kvn

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 116 new commits pushed to the master branch:

  • 3eac890: 8315061: Make LockingMode a product flag
  • 8419a53: 8315072: Remove unneeded AdaptivePaddedAverage::operator new
  • c90cd2c: 8286789: Test forceEarlyReturn002.java timed out
  • 89d18ea: 8312018: Improve reservation of class space and CDS
  • dd64a4a: 8315241: (fs) Move toRealPath tests in java/nio/file/Path/Misc.java to separate JUnit 5 test
  • 8e4cda0: 8314834: serviceability/jdwp/AllModulesCommandTest.java ignores VM flags
  • 1ea6463: 8314835: gtest wrappers should be marked as flagless
  • 93e82c0: 8314824: Fix serviceability/jvmti/8036666/GetObjectLockCount.java to use vm flags
  • 7daae1f: 8314263: Signed jars triggering Logger finder recursion and StackOverflowError
  • 6701eba: 8315117: Update Zlib Data Compression Library to Version 1.3
  • ... and 106 more: https://git.openjdk.org/jdk/compare/8939d15d92982300f090bc1c51f59550529eaaf3...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 30, 2023
Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Looks good to me too. Thank you for explaining the issue in details.

@rwestrel
Copy link
Contributor Author

rwestrel commented Sep 4, 2023

@chhagedorn @vnkozlov thanks for the reviews.

@rwestrel
Copy link
Contributor Author

rwestrel commented Sep 4, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Sep 4, 2023

Going to push as commit 9def453.
Since your change was applied there have been 162 commits pushed to the master branch:

  • 6c821f5: 8315545: C1: x86 cmove can use short branches
  • d7e4087: 8315369: [JVMCI] failure to attach to a libgraal isolate during shutdown should not be fatal
  • d1cabe4: 8315566: [JVMCI] deadlock in JVMCI startup when bad option specified
  • 94a74a0: 8315534: Incorrect warnings about implicit annotation processing
  • 84425a6: 8315452: Erroneous AST missing modifiers for partial input
  • 3094fd1: 8314662: jshell shows duplicated signatures of javap
  • 0d52c82: 8310220: IGV: dump graph after each IGVN step at level 4
  • adfc1d6: 8313323: javac -g on a java file which uses unnamed variable leads to ClassFormatError when launching that class
  • 2dc930d: 8314997: Missing optimization opportunities due to missing try_clean_mem_phi() calls
  • ab12c5d: 8315549: CITime misreports code/total nmethod sizes
  • ... and 152 more: https://git.openjdk.org/jdk/compare/8939d15d92982300f090bc1c51f59550529eaaf3...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 4, 2023
@openjdk openjdk bot closed this Sep 4, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 4, 2023
@openjdk
Copy link

openjdk bot commented Sep 4, 2023

@rwestrel Pushed as commit 9def453.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants