-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8323154: C2: assert(cmp != nullptr && cmp->Opcode() == Op_Cmp(bt)) failed: no exit test #17459
Conversation
…iled: no exit test
👋 Welcome back chagedorn! A progress list of the required criteria for merging this PR into |
@chhagedorn 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. |
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 to me.
@chhagedorn 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 50 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. ➡️ To integrate this PR with the above commit message to the |
Thanks Roland for your review! |
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 to me too.
I suggest to do this investigation together with fixing CountedLoop* -> BaseCountedLoop* in the methods used in ok_to_convert() in a separate RFE.
Makes sense.
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.
Thanks a lot for fixing this.
Thanks Tobias and Quan for your reviews! I've filed JDK-8323968 to follow up on the mentioned bailouts. |
/integrate |
Going to push as commit 6997bfc.
Your commit was automatically rebased without conflicts. |
@chhagedorn Pushed as commit 6997bfc. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
/backport jdk22u |
@TobiHartmann the backport was successfully created on the branch backport-TobiHartmann-6997bfc6 in my personal fork of openjdk/jdk22u. To create a pull request with this backport targeting openjdk/jdk22u:master, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
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/jdk22u:
|
This bug is very similar to JDK-8314191 but with long counted loops instead of int counted loops and a with a different manifestation.
The original problem was that JDK-8276162 added transformations for
CmpI
nodes to useCmpU
nodes instead. The transformations were also applied forCmpI
nodes of counted loop exit checks which messed pattern matching up. JDK-8314191 and the follow-up fix JDK-8316719 fixed this but only forCountedLoopNodeEndNodes
. The newly addedis_cloop_condition()
method only checks foris_CountedLoopEnd()
(int counted loops) instead ofis_BaseCountedLoopEnd()
(also includes long counted loop). This patch fixes this.I've had a closer look at other uses of
is_CountedLoop*
and found thatjdk/src/hotspot/share/opto/subnode.cpp
Lines 126 to 139 in 1007618
and
jdk/src/hotspot/share/opto/subnode.cpp
Lines 155 to 163 in 1007618
should probably also use the
BaseCountedLoop*
versions. These methods are used inok_to_convert()
which is used in several places. They try to prevent transformations involving the iv and the increment node of a counted loop to save registers. However, these transformations are still applied before a loop is transformed to a counted loop. This raises the question whether these bailouts should be extended to also work before loop opts. Since this code has been around for such a long time, it would also be interesting to see, if it's still beneficial to block these optimizations in general. If so, it might be good if we could add some IR tests to prove that.There are more places where we try to prevent such transformations but again only if we already have a counted loop. For example:
jdk/src/hotspot/share/opto/addnode.cpp
Lines 176 to 191 in 1007618
or
jdk/src/hotspot/share/opto/addnode.cpp
Lines 193 to 209 in 1007618
It might be a good idea to revisit all of these bailouts in general and check if it's still beneficial to have them around and if they should be extended to also work before loop opts.
I suggest to do this investigation together with fixing
CountedLoop*
->BaseCountedLoop*
in the methods used inok_to_convert()
in a separate RFE.Thanks,
Christian
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17459/head:pull/17459
$ git checkout pull/17459
Update a local copy of the PR:
$ git checkout pull/17459
$ git pull https://git.openjdk.org/jdk.git pull/17459/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 17459
View PR using the GUI difftool:
$ git pr show -t 17459
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17459.diff
Webrev
Link to Webrev Comment