-
Notifications
You must be signed in to change notification settings - Fork 143
8271272: C2: assert(!had_error) failed: bad dominance #287
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.
Nice analysis. Looks good.
@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 14 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 |
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. Testing is still running, I'll get back once it completed.
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!
Testing looks good. |
@vnkozlov @chhagedorn @TobiHartmann thanks for the reviews. |
/integrate |
Going to push as commit e351de3.
Your commit was automatically rebased without conflicts. |
The test has a counted loop. The type of the iv Phi of the counted loop is set initially to: min+5..7. The loop body contains a ConvI2L of the iv Phi. That value is used as a value to be stored right out of the loop. That ConvI2L captures the type of the iv Phi: minint+5..7. Pre/main/post loops are created. The loop is unrolled once. The ConvI2L is cloned and pushed thru the Add of the iv. The increment of the loop is 2. The new ConvI2L now takes the iv Phi as input and has type: minint+5..5. CCP runs and updates the type of the iv Phi to: int:6..7. That type conflicts with the type of the second ConvI2L. That node is transformed to top which causes the Store to be transformed to top. The Store has a Phi as use. That Phi is transformed to the remaining non top input. That causes the assert failure.
This happens because the main loop body never executes. The entry test would constant fold if it didn't use an Opaque1.
The exit condition of the main loop will next constant fold, the backedge is removed. So the fix for JDK-8269752 should have prevented this issue because once the main loop backedge is removed, the Opaque1 of the entry test should also be removed. But I noticed working on this, that the fix for JDK-8269752 is not sufficient. In the case of JDK-8269752, both the main and post loops loose their backedge but, with the fix, only the Opaque1 for the post loop is removed. That's good enough for JDK-8269752 but not here. The reason the fix for JDK-8269752 doesn't trigger is that the main loop is strip mined. When the main loop looses its backedge, the logic that checks for an Opaque1 in the entry test of the main loop does trigger but because it sees a dying counted loop it doesn't properly step over the outer strip mined loop. The fix I propose changes the logic in CountedLoopNode::skip_strip_mined() so that it works with a dying counted loop node.
Tobias has started testing for this fix.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk17 pull/287/head:pull/287
$ git checkout pull/287
Update a local copy of the PR:
$ git checkout pull/287
$ git pull https://git.openjdk.java.net/jdk17 pull/287/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 287
View PR using the GUI difftool:
$ git pr show -t 287
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk17/pull/287.diff