Skip to content

8385588: Tune APX support in C2 backend#31315

Open
dwhite-intel wants to merge 1 commit into
openjdk:masterfrom
dwhite-intel:simpler-apx
Open

8385588: Tune APX support in C2 backend#31315
dwhite-intel wants to merge 1 commit into
openjdk:masterfrom
dwhite-intel:simpler-apx

Conversation

@dwhite-intel
Copy link
Copy Markdown

@dwhite-intel dwhite-intel commented May 28, 2026

For the latest Intel processors with APX support, HW architects recommend a different balance of APX and legacy instructions for best performance.

This patch removes support for:

NDD instructions with memory-based operands
APX version of SETZUcc



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-8385588: Tune APX support in C2 backend (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31315

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@dwhite-intel dwhite-intel changed the title Simpler APX support 8385588: Tune APX support in C2 backend May 28, 2026
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 28, 2026

👋 Welcome back drwhite! 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
Copy Markdown

openjdk Bot commented May 28, 2026

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

@openjdk openjdk Bot added the hotspot hotspot-dev@openjdk.org label May 28, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 28, 2026

@dwhite-intel 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
Copy link
Copy Markdown

openjdk Bot commented May 28, 2026

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.

@dwhite-intel dwhite-intel marked this pull request as ready for review May 28, 2026 22:31
@openjdk openjdk Bot added the rfr Pull request is ready for review label May 28, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented May 28, 2026

Webrevs

Comment on lines -9333 to -9334
instruct cmovI_rReg_rReg_memUCFE_ndd(rRegI dst, cmpOpUCFE cop, rFlagsRegUCFE cr, rRegI src1, memory src2)
%{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wondering if we should add an instruct:

instruct cmovI_memUCFE(cmpOpUCFE cop, rFlagsRegUCFE cr, rRegI dst, memory src) %{
  match(Set dst (CMoveI (Binary cop cr) (Binary dst (LoadI src))));

  ins_cost(250);
  expand %{
    __ cmovl((Assembler::Condition)($cop$$cmpcode), $dst$$Register, $src$$Address);
  %}
%}

Comment on lines -9777 to -9779
instruct cmovL_rReg_rReg_memUCFE_ndd(rRegL dst, cmpOpUCFE cop, rFlagsRegUCFE cr, rRegL src1, memory src2)
%{
match(Set dst (CMoveL (Binary cop cr) (Binary src1 (LoadL src2))));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wondering if we should add an instruct:


instruct cmovL_memUCFE(cmpOpUCFE cop, rFlagsRegUCFE cr, rRegL dst, memory src) %{
  match(Set dst (CMoveL (Binary cop cr) (Binary dst (LoadL src))));

  ins_cost(200);
  expand %{
     __ cmovq((Assembler::Condition)($cop$$cmpcode), $dst$$Register, $src$$Address);
  %}
%}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot hotspot-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants