Skip to content
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

8332369: C2: assert(false) failed: graph should be schedulable after JDK-8324517 #19277

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rwestrel
Copy link
Contributor

@rwestrel rwestrel commented May 17, 2024

The issue occurs when a Mod node is processed during
final_graph_reshaping: if a Div node is found with the same inputs,
the Mod is replaced either by a DivMod node or a subgraph that has
the Div node as input. Finding the Div node is done
find_similar() which ignores the precedence edges. What happens is
that the Div node returned by find_similar() could have a
precedence edge that pins it at a control that doesn't dominate the
control of some of the uses of the Mod node.

The fix I propose is to simply not perfom the transformation if one of
the nodes has precedence edges (which should be a rare corner case).


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8332369: C2: assert(false) failed: graph should be schedulable after JDK-8324517 (Bug - P2) ⚠️ Issue is not open.

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19277/head:pull/19277
$ git checkout pull/19277

Update a local copy of the PR:
$ git checkout pull/19277
$ git pull https://git.openjdk.org/jdk.git pull/19277/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19277

View PR using the GUI difftool:
$ git pr show -t 19277

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19277.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 17, 2024

👋 Welcome back roland! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented May 17, 2024

@rwestrel This change is no longer ready for integration - check the PR body for details.

@openjdk openjdk bot added the rfr Pull request is ready for review label May 17, 2024
@openjdk
Copy link

openjdk bot commented May 17, 2024

@rwestrel The following label will be automatically applied to this pull request:

  • hotspot-compiler

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.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label May 17, 2024
@mlbridge
Copy link

mlbridge bot commented May 17, 2024

Webrevs

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks reasonable. I've submitted some testing.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 17, 2024
// Check if a%b and a/b both exist
Node* d = n->find_similar(Op_DivI);
if (d) {
if (d && !d->has_prec_edges()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be replaced with

Suggested change
if (d && !d->has_prec_edges()) {
if (d != nullptr && !d->has_prec_edges()) {

Same at other places below.

Copy link
Member

@TobiHartmann TobiHartmann left a 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 too. Christian's testing passed.

@openjdk
Copy link

openjdk bot commented Jun 6, 2024

@rwestrel this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JDK-8332369
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added merge-conflict Pull request has merge conflict with target branch and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org merge-conflict Pull request has merge conflict with target branch
3 participants