-
Notifications
You must be signed in to change notification settings - Fork 5.8k
JDK-8275854: C2: assert(stride_con != 0) failed: missed some peephole opt #6099
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
Conversation
👋 Welcome back casparcwang! A progress list of the required criteria for merging this PR into |
@casparcwang The following label will be automatically applied to this pull request:
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. |
Webrevs
|
Is it by mistake (that is it's erroneous to eliminate the LongCountedLoopEndNode)? |
Thank you for your review. The crash is reported by our fuzz test cluster, and caused by an OSR compilation. I have added the complete fuzz test as the test case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with such large and non-targeted regression tests is that they won't work for long. Other changes to C2 and/or HotSpot will change timing, profile information, IR shape, optimization sequence or other factors such that the issue will not reproduce anymore with that test. Often, the test also does not reproduce the issue in older JDK versions that are affected as well.
We therefore usually run creduce --not-c
on our generated tests to simplify them (see creduce). You might want to increase the number of loop iterations in the main method first and also add -Xbatch
.
The optimization is valid AFAIU, so I don't think blocking it is the right fix. What about something like this:
That prevents the crash and gives the loop another chance to be optimized. |
Thank you for your review. The test is indeed not targeted. I will try to reduce the test to a simpler case. |
Replace the |
/contributor add rwestrel |
@casparcwang Could not parse
|
/contributor add roland |
@casparcwang |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks good to me.
|
@casparcwang 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:
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 296 new commits pushed to the
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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TobiHartmann, @rwestrel, @vnkozlov) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
ping, can I have more review of this pr? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks reasonable to me but please add a comment to the new code.
I'll run some testing in the meantime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. But please wait tests results from Tobias.
Thank you very much for your review and testing. I have added some comment to the newly added code. |
Thank you very much for your review and work. I have passed jtreg and some test-suite on my server, and it's always a good thing to run more tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment looks good and all tests passed.
/integrate |
@casparcwang |
/sponsor |
Going to push as commit aea0967.
Your commit was automatically rebased without conflicts. |
@huishi-hs @casparcwang Pushed as commit aea0967. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
If subsume
optimization will eliminateLongCountedLoopEndNode
node by mistake, which will lead toPhaseIdealLoop
optimization crash.For example, the test of node 538 and node 553 will become the same after the first

PhaseIdealLoop
optimization. Node 555 is the back edge to the loop, and node 553 will be replaced by aLongCountedLoopEndNode
node.In the next

PhaseIdealLoop
optimization, node 538 find node 553 is redundant, and will subsume node 553. Then thePhaseIdealLoop
optimization will crash, because there is no loop end node.There are two way to fix the crash, the first is like the way in this pr, just exit
IFNode subsume
optimization when it's aLongCountedLoopEndNode
node. The second possible fix is that exchange the dominatingIF
node with theLongCountedLoopEndNode
node:Progress
Issue
Reviewers
Contributors
<roland@openjdk.org>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6099/head:pull/6099
$ git checkout pull/6099
Update a local copy of the PR:
$ git checkout pull/6099
$ git pull https://git.openjdk.java.net/jdk pull/6099/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6099
View PR using the GUI difftool:
$ git pr show -t 6099
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6099.diff