Skip to content

8390441: RISC-V: Fix C2 stack-to-stack spill copies with large offsets - #4623

Open
zifeihan wants to merge 1 commit into
openjdk:masterfrom
zifeihan:backport-JDK-8390441
Open

8390441: RISC-V: Fix C2 stack-to-stack spill copies with large offsets#4623
zifeihan wants to merge 1 commit into
openjdk:masterfrom
zifeihan:backport-JDK-8390441

Conversation

@zifeihan

@zifeihan zifeihan commented Aug 18, 2026

Copy link
Copy Markdown
Member

Hi, this patch is a backport of openjdk/jdk#32387 . this is a risc-v specific change. risk is low.

This backport is not clean:

  1. jdk17u-dev doesn't have predicate register support
  2. In jdk17u-dev, the vector stack-to-stack copy goes through spill_copy_vector_stack_to_stack, where the data is transferred via v0 and t0 is only used for address computation (capable of handling large offsets), so there is no conflict. The scalar path's sd(t0, Address(sp, dst_offset)) only uses t0 as an address temporary when the offset exceeds simm12, which would clobber the value; therefore, only the scalar case's dst_offset needs to be checked.

Testing: the test TestRiscvLargeStackToStack.java[1], which previously had test failures, has now passed.

[1] https://bugs.openjdk.org/secure/attachment/121298/TestRiscvLargeStackToStack.java



Progress

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

Issue

  • JDK-8390441: RISC-V: Fix C2 stack-to-stack spill copies with large offsets (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4623

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Aug 18, 2026

Copy link
Copy Markdown

👋 Welcome back gcao! 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.

@zifeihan

Copy link
Copy Markdown
Member Author

/approval request
Same issue is there in jdk17u-dev repo. This is a RISC-V specific change, risk is low.
Testing: the test TestRiscvLargeStackToStack, which previously had test failures, has now passed.

@openjdk

openjdk Bot commented Aug 18, 2026

Copy link
Copy Markdown

❗ 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 764e83c46c839164c137cd2f058c7cc2b6519dc6 8390441: RISC-V: Fix C2 stack-to-stack spill copies with large offsets Aug 18, 2026
@openjdk

openjdk Bot commented Aug 18, 2026

Copy link
Copy Markdown

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 rfr Pull request is ready for review labels Aug 18, 2026
@openjdk

openjdk Bot commented Aug 18, 2026

Copy link
Copy Markdown

@zifeihan
8390441: The approval request has been created successfully.

@openjdk openjdk Bot added the approval Requires approval; will be removed when approval is received label Aug 18, 2026
@mlbridge

mlbridge Bot commented Aug 18, 2026

Copy link
Copy Markdown

Webrevs

@RealFYang RealFYang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@GoeLin

GoeLin commented Aug 18, 2026

Copy link
Copy Markdown
Member

Hi @zifeihan
please do 21 first. removing the label in the meantime.

@openjdk

openjdk Bot commented Aug 18, 2026

Copy link
Copy Markdown

⚠️ @zifeihan 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 removed the approval Requires approval; will be removed when approval is received label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

3 participants