-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8267399: C2: java/text/Normalizer/ConformanceTest.java test failed with assertion #4388
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 roland! A progress list of the required criteria for merging this PR into |
Webrevs
|
main_limit = new CastIINode(main_limit, TypeInt::make(upward ? min_jint : orig_limit_t->_lo, | ||
upward ? orig_limit_t->_hi : max_jint, Type::WidenMax)); |
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.
First, need comment.
Second, why you used min_jint and max_jint instead of main_limit->_lo and main_limit->_hi?
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 for the reviewing this.
Second, why you used min_jint and max_jint instead of main_limit->_lo and main_limit->_hi?
Range check elimination changes the main loop's limit. For a loop going up, the new limit is less or equal to the initial limit. So it's less than main_limit->_hi. But it's not guaranteed to be greater or equal to main_limit->_lo. Say, main_limit is a constant, then main_limit->_lo = main_limit->_hi. The new limit can't be >= main_limit->_lo otherwise the new limit is main_limit->_lo = main_limit->_hi and the limit is unchanged.
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.
First, need comment.
Comment added.
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.
What are you saying is that low limit does not matter when stride > 0 and we can use min_jint instead of complex expression (if we want correct value). Is it right?
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.
Yes, right.
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.
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 230 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.
The bug is filed with fix version 17, but the PR is on 18. I suggest moving this to the 17-repo before pushing.
Otherwise looks good! Reviewed.
This was found with Shenandoah but has nothing specific to Shenandoah.
For the inner loop of the test case:
the loop limit, len, is known to be either 1 or 2. As a consequence
the type of the iv phi is set to [0..2].
range check elimination is applied which causes the pre/main/post
loops to be added and the limit of the main loop to be adjusted. C2
computes the limit of the main loop as TypeINT:INT.
the main loop is peeled. So now the type of the iv phi is 2 and it
constant folds. Because the main loop limit has type TypeInt::INT,
the exit condition of the loop doesn't constant fold. But the loop
no longer has the shape of a counted loop because the iv phi doesn't
exist anymore.
The crash then occurs when some other loop opts is attempted and loop
strip mining verification code checks that the shape of the main loop
is that of a counted loop.
The fix I propose is to add a CastII at range elimination time that
captures the bounds of the limit before RC is applied. This way the
type of the limit is not lost and the main loop backbranch can be
properly eliminated in the chain of events above.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4388/head:pull/4388
$ git checkout pull/4388
Update a local copy of the PR:
$ git checkout pull/4388
$ git pull https://git.openjdk.java.net/jdk pull/4388/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4388
View PR using the GUI difftool:
$ git pr show -t 4388
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4388.diff