Skip to content

Conversation

TheRealMDoerr
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr commented Oct 14, 2025

The test VectorMaskCompareNotTest requires 16 Byte vectors (or larger). If the machine only uses 8 Byte vectors, we get an exception in the static initializer because the code tries to use a 4 Byte vector which is unsupported (stack trace: see JBS issue JDK-8369511). This is an alternative to #27749.


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-8368205: [TESTBUG] VectorMaskCompareNotTest.java crashes when MaxVectorSize=8 (Bug - P4)

Reviewers

Reviewers without OpenJDK IDs

  • @erifan (no known openjdk.org user name / role) Review applies to 3041e656

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27805

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 14, 2025

👋 Welcome back mdoerr! 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 Oct 14, 2025

@TheRealMDoerr 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:

8368205: [TESTBUG] VectorMaskCompareNotTest.java crashes when MaxVectorSize=8

Reviewed-by: dzhang, epeter, rrich

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 30 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 Oct 14, 2025

@TheRealMDoerr 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 Oct 14, 2025
@mlbridge
Copy link

mlbridge bot commented Oct 14, 2025

Webrevs

@eme64
Copy link
Contributor

eme64 commented Oct 15, 2025

@TheRealMDoerr I think I prefer this solution 😊

Though I wonder if we need to add some kind of label for the jtreg changes? I'm not familiar with the code there.
But I can surely approve the test changes :)

Copy link
Member

@reinrich reinrich left a comment

Choose a reason for hiding this comment

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

I think this is a good and easy to understand solution.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 15, 2025
@eme64
Copy link
Contributor

eme64 commented Oct 15, 2025

@TheRealMDoerr I'll approve after some internal sanity testing :)

@TheRealMDoerr
Copy link
Contributor Author

@DingliZhang, @RealFYang: Can one of you please check if this is also fine for RISC-V, please?

@TheRealMDoerr TheRealMDoerr changed the title 8369511: PPC64: compiler/vectorapi/VectorMaskCompareNotTest.java fails when running without VectorRegisters 8368205: [TESTBUG] VectorMaskCompareNotTest.java crashes when MaxVectorSize=8 Oct 15, 2025
Copy link
Contributor

@erifan erifan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for taking care of the issue!

@TheRealMDoerr
Copy link
Contributor Author

@erifan: Thanks for the review! I've added a check if the flag is available similar to what you had in your PR. That may be needed for VM configurations without C2 compiler.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Oct 15, 2025
Copy link
Member

@DingliZhang DingliZhang left a comment

Choose a reason for hiding this comment

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

Hi @TheRealMDoerr Thanks for the patch! I’ve tested VectorMaskCompareNotTest.java on k1 and k230 (with RVV) as well as sg2042 (without RVV), and it looks good.

Copy link
Contributor

@eme64 eme64 left a comment

Choose a reason for hiding this comment

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

Looks reasonable. Sanity testing for commit 1 passed.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 16, 2025
@TheRealMDoerr
Copy link
Contributor Author

Thank you for all the reviews and for testing!
/integrate

@openjdk
Copy link

openjdk bot commented Oct 16, 2025

Going to push as commit 6e911d8.
Since your change was applied there have been 35 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 Oct 16, 2025
@openjdk openjdk bot closed this Oct 16, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 16, 2025
@openjdk
Copy link

openjdk bot commented Oct 16, 2025

@TheRealMDoerr Pushed as commit 6e911d8.

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

@erifan
Copy link
Contributor

erifan commented Oct 16, 2025

@TheRealMDoerr Please consider whether my comment is reasonable. Also, @eme64 tested your commit 1, but then you pushed commit 2. So commit 1 is no longer the latest code. Although I think commit 2 will likely pass the test as well.

* @summary test combining vector not operation with compare
* @modules jdk.incubator.vector
* @requires (os.arch != "riscv64" | (os.arch == "riscv64" & vm.cpu.features ~= ".*rvv.*"))
* @requires vm.opt.final.MaxVectorSize == "null" | vm.opt.final.MaxVectorSize >= 16
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be

Suggested change
* @requires vm.opt.final.MaxVectorSize == "null" | vm.opt.final.MaxVectorSize >= 16
* @requires vm.opt.final.MaxVectorSize == "null" & vm.opt.final.MaxVectorSize >= 16

or

Suggested change
* @requires vm.opt.final.MaxVectorSize == "null" | vm.opt.final.MaxVectorSize >= 16
* @requires vm.compiler2.enabled & vm.opt.final.MaxVectorSize >= 16

?

Assume this test is run with another compiler (like Graal) that doesn't support the option MaxVectorSize, then vm.opt.final.MaxVectorSize == "null" holds. But this can't guarantee that the max vector size >= 16.

Copy link
Contributor

Choose a reason for hiding this comment

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

I forgot to submit this comment. I thought I submitted it two days ago.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought someone may want to run the test in a configuration without C2. So, I didn't want to change the test for such cases. I leave such decisions to others. Maybe @dougxc has an opinion about Graal?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe they just need to put their own guards there if they care? It's hard to guard this very generically.

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought someone may want to run the test in a configuration without C2.

Yeah I know your point. But vm.opt.final.MaxVectorSize == "null" doesn't work I think, because this doesn't guarantee the max vector size >= 16. Perhaps as @eme64 pointed out, it is hard for us to ensure that all compilers work. This do no harm to C2 test, just a bit unnecessary.

@TheRealMDoerr TheRealMDoerr deleted the 8369511_VectorMaskCompareNotTest_noVSX_v2 branch October 17, 2025 08:24
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