Skip to content

Conversation

@Hamlin-Li
Copy link

@Hamlin-Li Hamlin-Li commented Nov 4, 2025

Hi,
Can you help to review this patch?

Not sure how this one slipped in (#28047), I think it passed my local test and github CI test at that time.
Please check https://bugs.openjdk.org/browse/JDK-8371297 for details.

Thanks!


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-8371297: C2: assert triggered in BoolTest::BoolTest (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28141

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 4, 2025

👋 Welcome back mli! 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 Nov 4, 2025

@Hamlin-Li 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:

8371297: C2: assert triggered in BoolTest::BoolTest

Reviewed-by: dlong, luhenry, epeter

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 101 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 Nov 4, 2025

@Hamlin-Li 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.

@Hamlin-Li Hamlin-Li marked this pull request as ready for review November 5, 2025 09:17
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 5, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 5, 2025

Webrevs

BoolTest::mask m = BoolTest::mask(_test._mask & ~BoolTest::unsigned_compare);
const BoolTest bt(m);
tty->print(" test=%s", m == _test._mask ? "" : "unsigned ");
bt.dump_on(tty);
Copy link
Member

Choose a reason for hiding this comment

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

I was wondering why we pass the raw mask around instead of keeping it encapsulated in a BoolTest object. Elsewhere I saw code like this:
cond->get_con() & (BoolTest::unsigned_compare - 1)
which seems to be making fragile assumptions about BoolTest internals.

Copy link
Author

@Hamlin-Li Hamlin-Li Nov 6, 2025

Choose a reason for hiding this comment

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

@dean-long Yes, I have the same feeling that BoolTest is currently used in a fragile way. The reasons could be, BoolTest itself is by design a struct and expose all its status, and unsigned_compare is indeed not formally supported but needed somewhere e.g. in vector intrinsic, and auto-vectorization (after #28047).
I think it's worth to do more investigation about the refactoring of BoolTest. Besides of several places using unsigned_compare, there are more places using signed BoolTest, it might be helpful to do it in another specific pr, so file https://bugs.openjdk.org/browse/JDK-8371396 to track it, feel free to take it if you already have a solution or idea.

This issue (in fact it's #27942) blocks several other prs in my backlog for a while, e.g. #25336, #25341. It helps to resolve this assert in a quick (although ugly) way. Please kindly let me know how you think about it. Thanks!

Copy link
Member

@dean-long dean-long left a comment

Choose a reason for hiding this comment

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

OK, I'm fine with cleaning this up as a separate issue.

@dean-long
Copy link
Member

/reviewers 2

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 7, 2025
@openjdk
Copy link

openjdk bot commented Nov 7, 2025

@dean-long
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Nov 7, 2025
@Hamlin-Li
Copy link
Author

OK, I'm fine with cleaning this up as a separate issue.

@dean-long Thank you for reviewing!

@Hamlin-Li
Copy link
Author

@luhenry Thank you for reviewing!

@Hamlin-Li
Copy link
Author

@eme64 Can you have a look? Thanks! :)

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 hacky but reasonable for now. Though maybe it would be nicer if we had some printing method that works directly on the mask? Or some other way of passing around the mask.

@eme64
Copy link
Contributor

eme64 commented Nov 11, 2025

@Hamlin-Li You have a PR title mismatch. And you should always give a quick description about what went wrong in your PR description ;)

@Hamlin-Li Hamlin-Li changed the title 8371297: C2: assert triggerred in BoolTest::BoolTest 8371297: C2: assert triggered in BoolTest::BoolTest Nov 11, 2025
@Hamlin-Li
Copy link
Author

Looks hacky but reasonable for now. Though maybe it would be nicer if we had some printing method that works directly on the mask? Or some other way of passing around the mask.

Yes, you're right. I created https://bugs.openjdk.org/browse/JDK-8371396 to track it.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 11, 2025
@Hamlin-Li
Copy link
Author

@Hamlin-Li You have a PR title mismatch. And you should always give a quick description about what went wrong in your PR description ;)

Thank you for reminding and reviewing! I'll pay attention later. :)

@Hamlin-Li
Copy link
Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 11, 2025

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

openjdk bot commented Nov 11, 2025

@Hamlin-Li Pushed as commit 405d5f7.

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

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.

4 participants