Skip to content

Conversation

@jatin-bhateja
Copy link
Member

@jatin-bhateja jatin-bhateja commented Dec 26, 2025

Existing demotable instruction patterns for negI/L_rReg_ndd have 'src' as their second operand, this leads to an failure during register biasing. Changing the NDD demotion flags names to encode explicit operand position i.e. Flag_ndd_demotable_opr1 and Flag_ndd_demotable_opr2 , splitting commutative flag into seperate new flags and fine tuning assertion checks based on new naming convention fixes the issue.

Failing test test/hotspot/jtreg/compiler/vectorization/TestSignumVector.java passes with the patch.

Kindly review and share your feedback.

Best Regards,
Jatin
PS: Validation performed using Intel SDE 9.58.


Progress

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

Issue

  • JDK-8373724: Assertion failure in TestSignumVector.java with UseAPX (Bug - P3)(⚠️ The fixVersion in this issue is [26] but the fixVersion in .jcheck/conf is 27, a new backport will be created when this pr is integrated.)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28999

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 26, 2025

👋 Welcome back jbhateja! 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 Dec 26, 2025

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

8373724: Assertion failure in TestSignumVector.java with UseAPX

Reviewed-by: sviswanathan

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 34 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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Dec 26, 2025

@jatin-bhateja 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 openjdk bot added the rfr Pull request is ready for review label Dec 26, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 26, 2025

Webrevs

@openjdk
Copy link

openjdk bot commented Dec 26, 2025

@jatin-bhateja Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@sviswa7
Copy link

sviswa7 commented Jan 5, 2026

@jatin-bhateja Thanks for looking into this. There is a build failure in GHA with the following message:
"src/hotspot/cpu/x86/x86.ad:2645:13: error: ‘bool is_ndd_demotable(const MachNode*)’ defined but not used [-Werror=unused-function]"

match(Set dst (OrL src1 (LoadL src2)));
effect(KILL cr);
flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_sets_parity_flag, PD::Flag_clears_overflow_flag, PD::Flag_clears_carry_flag, PD::Flag_ndd_demotable_commutative);
flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_sets_parity_flag, PD::Flag_clears_overflow_flag, PD::Flag_clears_carry_flag, PD::Flag_ndd_demotable_opr1, PD::Flag_ndd_demotable_opr2);
Copy link

Choose a reason for hiding this comment

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

Remove PD::Flag_ndd_demotable_opr2 as the second operand is a memory operand.

Copy link
Member Author

Choose a reason for hiding this comment

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

We already have a check for memory operands (mapping to multiple input edges) in place, ADLC generates DFA for both direct and flipped versions of the memory patterns. So Flag_ndd_demotable_opr2 will cover the flipped operand case.

Copy link

Choose a reason for hiding this comment

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

Thanks for the clarification. May be we should then add PD::Flag_ndd_demotable_opr2 to the following as well to be consistent:
xorI_rReg_rReg_mem_ndd
orI_rReg_rReg_mem_ndd
mulI_rReg_rReg_mem_ndd

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @sviswa7 , comment addressed

Copy link

@sviswa7 sviswa7 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 7, 2026
@jatin-bhateja
Copy link
Member Author

/integrate

@jatin-bhateja
Copy link
Member Author

jatin-bhateja commented Jan 7, 2026

Looks good to me.

Thanks @sviswa7 for your reviews.

@openjdk
Copy link

openjdk bot commented Jan 7, 2026

Going to push as commit 640343f.
Since your change was applied there have been 34 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 7, 2026
@openjdk openjdk bot closed this Jan 7, 2026
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 7, 2026
@openjdk
Copy link

openjdk bot commented Jan 7, 2026

@jatin-bhateja Pushed as commit 640343f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@dlunde
Copy link
Member

dlunde commented Jan 7, 2026

I will review this changeset now after integration, but, for future reference, please note that HotSpot changes require at least two reviews before integration (see https://openjdk.org/guide/#life-of-a-pr).

@missa-prime
Copy link
Contributor

I will review this changeset now after integration, but, for future reference, please note that HotSpot changes require at least two reviews before integration (see https://openjdk.org/guide/#life-of-a-pr).

@dlunde I'm planning to backport this to JDK-26. Please let me know when you're finished reviewing as soon as possible, so I can do so. Thanks!

@dlunde
Copy link
Member

dlunde commented Jan 9, 2026

@dlunde I'm planning to backport this to JDK-26. Please let me know when you're finished reviewing as soon as possible, so I can do so. Thanks!

@missa-prime Will do!

@dlunde
Copy link
Member

dlunde commented Jan 9, 2026

I agree with these changes. Nice that the assert caught this case!

I'm running some tests for the changeset over the weekend, for both JDK 26 and JDK 27. I'll report back on Monday, and then you can go ahead with the backport @missa-prime (if no issues show up in testing).

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

Labels

hotspot-compiler [email protected] integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

5 participants