-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
8257575: C2: "failed: only phis" assert failure in loop strip mining verification #1555
Conversation
👋 Welcome back roland! A progress list of the required criteria for merging this PR into |
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.
Relaxing the assert seems reasonable but shouldn't we also fix the problem that the load is not eliminated?
I tried that but that didn't prove easy to make robust. For instance, I added code that enqueues the dominated load in the inner loop for IGVN but by the time it is processed, the dominated load's inputs have not yet all been processed so the dominated load is not found as dominating (mismatching address input). Maybe we could revert the logic in LoadNode::Ideal() so it looks for a dominated load rather than a dominating load. I gave it a try but I saw some loads were still not eliminated so I gave up given it seems like such a corner case. |
Okay, thanks for the background information. |
@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:
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 96 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 |
@neliasso @TobiHartmann thanks for the reviews |
/integrate |
@rwestrel Since your change was applied there have been 98 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit f5a582c. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The loop in the test is a counted loop with a load pinned on the
backedge. The loop is strip mined. When the outer loop is expanded, it
ends up with a load on the backedge too as it must mirror the inner
loop. The load is input to a Phi. After expansion, the load on the
backedge of the outer loop is found to be rendundant with a dominating
load. That causes the Phi to be eliminated. The load on the backedge
of the inner loop is not eliminated. As a result, verification code
finds the inner and outer loops to have a different number of Phis
which is unexpected.
The load on the backedge of the inner loop could be eliminated. It's
not because it's not enqueued to be processed by the IGVN after loop
strip mining expansion. But beyond this immediate problem, because
IGVN processes each load separately, I think it's possible that it
succeeds in eliminating one of the loads but not the other (the graph
could have changed too much in the meantime). Because of that concern
and because it's a corner case, I think the most robust fix is to
relax the assert.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1555/head:pull/1555
$ git checkout pull/1555