jdk icon indicating copy to clipboard operation
jdk copied to clipboard

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

Open rwestrel opened this issue 9 months ago • 4 comments

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

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

Issue

  • JDK-8332369: C2: assert(false) failed: graph should be schedulable after JDK-8324517 (Bug - P2)

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

rwestrel avatar May 17 '24 07:05 rwestrel

:wave: 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.

bridgekeeper[bot] avatar May 17 '24 07:05 bridgekeeper[bot]

@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:

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

Reviewed-by: chagedorn, thartmann

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 69 new commits pushed to the master branch:

  • 90758f6735620776fcb60da9e0e2c91a4f53aaf1: 8332808: Always set java.io.tmpdir to a suitable value in the build
  • e19a421c30534566ba0dea0fa84f812ebeecfc87: 8332720: ubsan: instanceKlass.cpp:3550:76: runtime error: member call on null pointer of type 'struct Array'
  • 2581935b47afaf661a94c8a8e50ce08065d632f6: 8332528: Generate code in SwitchBootstraps.generateTypeSwitch that require fewer adaptations
  • b890336e111ea8473ae49e9992bc2fd61e716792: 8328083: degrade virtual thread support for GetObjectMonitorUsage
  • 4e6d851f3f061b4a9c2b5d2e3fba6a0277ac1f34: 8325324: Implement JEP 477: Implicitly Declared Classes and Instance Main Methods (Third Preview)
  • 612ae9289a130b8701f74253fe5499358a2e2b5b: 8332735: [JVMCI] Add extra JVMCI events for exception translation
  • 1ea76d338b99900089277b7a2da82c24382a6ce1: 8332675: test/hotspot/jtreg/gc/testlibrary/Helpers.java compileClass javadoc does not match after 8321812
  • 94af3c23ea09ef2869cdc666d8170a655a0b3602: 8329203: Parallel: Investigate Mark-Compact for Full GC to decrease memory usage
  • 1e5a2780d9cc8e73ce65bdccb98c1808aadd0784: 8332676: Remove unused BarrierSetAssembler::incr_allocated_bytes
  • c2180d141ccca0e396ee9a0cd3044c4428b963d5: 8315767: InetAddress: constructing objects from BSD literal addresses
  • ... and 59 more: https://git.openjdk.org/jdk/compare/ae999eae7e61072ad964a43f622fa930ce1179f7...master

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 master branch, type /integrate in a new comment.

openjdk[bot] avatar May 17 '24 07:05 openjdk[bot]

@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[bot] avatar May 17 '24 07:05 openjdk[bot]

Webrevs

mlbridge[bot] avatar May 17 '24 07:05 mlbridge[bot]