8382536: C2: sharpen_type_after_if: assert(val->find_edge(con) > 0) failed: mismatch#31798
8382536: C2: sharpen_type_after_if: assert(val->find_edge(con) > 0) failed: mismatch#31798iwanowww wants to merge 3 commits into
Conversation
|
👋 Welcome back vlivanov! A progress list of the required criteria for merging this PR into |
|
@iwanowww 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 26 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 |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
Webrevs
|
chhagedorn
left a comment
There was a problem hiding this comment.
Otherwise, the fix looks good to me, thanks!
| if ((btest == BoolTest::eq && tcon == success_tval) || | ||
| (btest == BoolTest::ne && tcon->join(success_tval)->empty())) { |
There was a problem hiding this comment.
Maybe a small comment like this would help here:
// gen_instanceof() emits 1 on success and 0 on failure.
// Check whether the current outer comparison selects the success value.
Optionally, we could also assert that the success and failure phi inputs are 1 and 0, respectively.
There was a problem hiding this comment.
Done.
Optionally, we could also assert that the success and failure phi inputs are 1 and 0, respectively.
I'm not sure it always holds. It's part of IR shape matching: we know the shape of con/tcon and the check extends it to val (Phi) inputs.
There was a problem hiding this comment.
I see, then let's leave it like that.
marc-chevalier
left a comment
There was a problem hiding this comment.
That looks good to me, but I agree with @chhagedorn comments. They helped me when reviewing.
chhagedorn
left a comment
There was a problem hiding this comment.
That looks good to me, thanks for the update!
| if ((btest == BoolTest::eq && tcon == success_tval) || | ||
| (btest == BoolTest::ne && tcon->join(success_tval)->empty())) { |
There was a problem hiding this comment.
I see, then let's leave it like that.
|
Thanks for the reviews, Christian and Marc. /integrate |
|
Going to push as commit 4d3723b.
Your commit was automatically rebased without conflicts. |
|
/backport :jdk27 |
|
@iwanowww the backport was successfully created on the branch backport-iwanowww-4d3723b8-jdk27 in my personal fork of openjdk/jdk. To create a pull request with this backport targeting openjdk/jdk:jdk27, 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/jdk: |
The shape of instanceof check matched by JDK-8372634 expects a constant to be a Con node. But it turns out it's not always the case: it can be a CastII when a value is provably constant after a runtime check.
The fix enhances the logic to properly match such IR shape.
Testing: hs-tier1 - hs-tier5
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31798/head:pull/31798$ git checkout pull/31798Update a local copy of the PR:
$ git checkout pull/31798$ git pull https://git.openjdk.org/jdk.git pull/31798/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 31798View PR using the GUI difftool:
$ git pr show -t 31798Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31798.diff
Using Webrev
Link to Webrev Comment