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
8271056: C2: "assert(no_dead_loop) failed: dead loop detected" due to cmoving identity #6172
Conversation
… cmoving identity
|
@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. Thanks!
@chhagedorn This change now passes all automated pre-integration checks. 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 278 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.
|
Thanks Vladimir 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.
Thanks Tobias for your review! |
/integrate |
Going to push as commit 5448139.
Your commit was automatically rebased without conflicts. |
@chhagedorn Pushed as commit 5448139. |
In the testcase, an unsafe cmoving identity is applied in
PhiNode::Identity()
after parsing which replaces a loop phi in a dead loop creating a dead data loop which triggers the assertion. The problem is thatPhiNode::Identity()
assumes that a cmoving identity is always safe becausePhiNode::Ideal()
handles unsafe cases and only leaves safe cases toPhiNode::Identity()
:jdk/src/hotspot/share/opto/cfgnode.cpp
Lines 2051 to 2055 in 4c3491b
However, the fix for JDK-8268883 added the following additional condition to wait for the region to be processed:
jdk/src/hotspot/share/opto/cfgnode.cpp
Lines 2047 to 2053 in 4c3491b
This skips the process of an unsafe case in
PhiNode::Ideal()
in the testcase. Afterwards, the unsafe case is replaced unconditionally inPhiNode::Identity()
resulting in a dead data loop.I therefore propose to add the same check added in JDK-8268883 to
PhiNode::Identity()
to prevent that.Thanks,
Christian
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6172/head:pull/6172
$ git checkout pull/6172
Update a local copy of the PR:
$ git checkout pull/6172
$ git pull https://git.openjdk.java.net/jdk pull/6172/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6172
View PR using the GUI difftool:
$ git pr show -t 6172
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6172.diff