Skip to content

8388882: Disable automatic integer spills to floating point registers on Intel platforms#32031

Open
missa-prime wants to merge 1 commit into
openjdk:masterfrom
missa-prime:user/missa-prime/fpu
Open

8388882: Disable automatic integer spills to floating point registers on Intel platforms#32031
missa-prime wants to merge 1 commit into
openjdk:masterfrom
missa-prime:user/missa-prime/fpu

Conversation

@missa-prime

@missa-prime missa-prime commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

When operating on integer variables using supported Intel CPUs, the current approach is to spill onto floating point registers when general purpose registers aren't available. Unfortunately, it appears that the cost of doing this is higher than just leaving those variables on the stack. This change disables the UseFPUForSpilling flag by default on Intel CPUs.

To measure performance, the SpillCode.testSpillForManyInts micro-benchmark was run on the parts listed below.

The table below shows how performance changed using the OpenJDK v28-b6 build. The Baseline column represents runs where the flag was enabled, and the New columns represents runs where the flag was disabled. Each result is the mean of 4 individual runs. Overall, setting UseFPUForSpilling to false provides an uplift between 7% and 10%.

Part ID Baseline runtime (ns/op) New runtime (ns/op) Speedup
Intel® Xeon® Platinum 8252C 551.357 516.526 1.07x
Intel® Xeon® Platinum 8375C 726.729 661.194 1.10x
Intel® Xeon® Platinum 8488C 644.611 597.476 1.08x
Intel® Xeon® Platinum 8559C 613.719 567.634 1.08x
Intel® Xeon® Platinum 6975P-C 627.716 581.841 1.08x

Additionally, other micro-benchmarks show improvements when disabling the flag.



Progress

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

Issue

  • JDK-8388882: Disable automatic integer spills to floating point registers on Intel platforms (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 32031

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jul 23, 2026

Copy link
Copy Markdown

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

openjdk Bot commented Jul 23, 2026

Copy link
Copy Markdown

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

8388882: Disable automatic integer spills to floating point registers on Intel platforms

Reviewed-by: sviswanathan, drwhite

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

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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@sviswa7, @dwhite-intel) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk Bot added the hotspot hotspot-dev@openjdk.org label Jul 23, 2026
@openjdk

openjdk Bot commented Jul 23, 2026

Copy link
Copy Markdown

@missa-prime The following label will be automatically applied to this pull request:

  • hotspot

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 commented Jul 23, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot. This can be overridden with the /reviewers command.

@missa-prime
missa-prime marked this pull request as ready for review July 23, 2026 22:23
@openjdk openjdk Bot added the rfr Pull request is ready for review label Jul 23, 2026
@mlbridge

mlbridge Bot commented Jul 23, 2026

Copy link
Copy Markdown

Webrevs

@sviswa7 sviswa7 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to me.

@sviswa7

sviswa7 commented Jul 24, 2026

Copy link
Copy Markdown

/label hotspot-compiler

@openjdk openjdk Bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Jul 24, 2026
@openjdk

openjdk Bot commented Jul 24, 2026

Copy link
Copy Markdown

@sviswa7
The hotspot-compiler label was successfully added.

@dwhite-intel dwhite-intel left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yes, looks good!

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot hotspot-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

3 participants