Skip to content

8361699: C2: assert(can_reduce_phi(n->as_Phi())) failed: Sanity: previous reducible Phi is no longer reducible before SUT#376

Open
shipilev wants to merge 1 commit intoopenjdk:masterfrom
shipilev:JDK-8361699-c2-reducible-phi
Open

8361699: C2: assert(can_reduce_phi(n->as_Phi())) failed: Sanity: previous reducible Phi is no longer reducible before SUT#376
shipilev wants to merge 1 commit intoopenjdk:masterfrom
shipilev:JDK-8361699-c2-reducible-phi

Conversation

@shipilev
Copy link
Member

@shipilev shipilev commented Mar 12, 2026

Fixes C2 EA bug, regression in JDK 22. This looks to be a correctness bug, as we have to handle another case in propagating non-scalar-replaceable state.

Additional testing:

  • Linux AArch64 server fastdebug, new regression test fails without the fix, passes with it
  • Linux AArch64 server fastdebug, all

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8361699 needs maintainer approval

Issue

  • JDK-8361699: C2: assert(can_reduce_phi(n->as_Phi())) failed: Sanity: previous reducible Phi is no longer reducible before SUT (Bug - P3 - Requested)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/376/head:pull/376
$ git checkout pull/376

Update a local copy of the PR:
$ git checkout pull/376
$ git pull https://git.openjdk.org/jdk25u-dev.git pull/376/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 376

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/376.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 12, 2026

👋 Welcome back shade! 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 Mar 12, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport 6f493b4d2e7120cbe34fb70d595f7626655b47a9 8361699: C2: assert(can_reduce_phi(n->as_Phi())) failed: Sanity: previous reducible Phi is no longer reducible before SUT Mar 12, 2026
@openjdk
Copy link

openjdk bot commented Mar 12, 2026

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required labels Mar 12, 2026
@openjdk
Copy link

openjdk bot commented Mar 12, 2026

⚠️ @shipilev This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 12, 2026
@mlbridge
Copy link

mlbridge bot commented Mar 12, 2026

Webrevs

Copy link

@JohnTortugo JohnTortugo left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@shipilev
Copy link
Member Author

/approval request Fixes C2 EA bug, regression in JDK 22, so it affects JDK 25. This is bug in EA, which shows that some EA invariants do not hold in corner cases, meaning it can be a correctness issue. Applies cleanly; reproducer fails without the fix and passes with it. All other tests also pass. The usual risk of C2 changes, this one looks to be fairly straightforward.

@openjdk
Copy link

openjdk bot commented Mar 12, 2026

@shipilev
8361699: The approval request has been created successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval Requires approval; will be removed when approval is received backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants