8288445: AArch64: C2 compilation fails with guarantee(!true || (true && (shift != 0))) failed: impossible encoding #40
Conversation
👋 Welcome back dlong! A progress list of the required criteria for merging this PR into |
@dean-long The following label will be automatically applied to this pull request:
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. |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What instruction will the zero-shift be matched with then?
Instead of introducing |
Co-authored-by: Tobias Hartmann <tobias.hartmann@oracle.com>
The shift instruction that takes a vector register shift count rather than an immediate. |
I considered using left-shift by 0, but I don't think it's worth it to optimize this case in the back-end. If we really want to optimize shift by 0, I think it should be done in the front-end. |
There was a problem hiding this 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.
@dean-long 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:
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 38 new commits pushed to the
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 |
Okay. I think we may want to make the same update to the corresponding SVE part, e.g. https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/aarch64/aarch64_sve.ad#L3662, as it's better to align with the NEON and SVE implementations. It may deserve one separate patch, not in this bugfix one. |
Thanks Tobias. |
@shqking Yes, that's a good idea for a separate RFE targeted for jdk20. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (I'm not a Reviewer).
Co-authored-by: Andrew Haley <aph-open@littlepinkcloud.com>
Co-authored-by: Hao Sun <hao.sun@arm.com>
There was a problem hiding this 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.
Thanks @nsjian, @shqking, and @theRealAph. |
/integrate |
Going to push as commit b449038.
Your commit was automatically rebased without conflicts. |
@dean-long Pushed as commit b449038. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The range for aarch64 vector right-shift is 1 to the element width. This issue fixes the problem in the back-end. There is a separate problem in the front-end that shift by 0 is not always optimized out.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk19 pull/40/head:pull/40
$ git checkout pull/40
Update a local copy of the PR:
$ git checkout pull/40
$ git pull https://git.openjdk.org/jdk19 pull/40/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 40
View PR using the GUI difftool:
$ git pr show -t 40
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk19/pull/40.diff