Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(0.49) Accelerate StringCoding.hasNegatives on Z #20692

Merged
merged 5 commits into from
Nov 27, 2024

Conversation

dchopra001
Copy link
Contributor

@dchopra001 dchopra001 commented Nov 27, 2024

Accelerate StringCoding.hasNegatives() API on s390 platform.

Port of #20574

This commit accelerates the StringCoding.hasNegatives API
that is found in Java11+ and is considered and intrinsic
candidate.

Signed-off-by: Dhruv Chopra <[email protected]>
This commit adds a missing break statement when indicating
that StringCoding.hasNegatives API in the optimizer.

Signed-off-by: Dhruv Chopra <[email protected]>
This commit simplfies some of the code around and inside the
inlineStringCodingHasNegatives evaluator in the z/codegen.
The changes are:
- Return true unconditionally after inlining StringCoding.hasNegatives
- Add doxygen comments for inlineStringCodingHasNegatives
- Declare one-time use variables to consts in inlineStringCodingHasNegatives

Signed-off-by: Dhruv Chopra <[email protected]>
This commit adds the following improvements to the z/codegen
intrinsic evaluator for the StringCoding.hasNegatives() API.

- Remove unnecessary doxygen comment
- Use shorter sized instructions where possible
- Use ARK instead of AGRK for adding 32-bit data to avoid potential
  bugs
- Process 16 chars in residue handling code to save an extra branch
  instruction
- Reuse registers where possible

Signed-off-by: Dhruv Chopra <[email protected]>
- Fix a bug where 0 length arrays return an incorrect value
- Fix a bug where offsets indicating starting point of
  'hasNegatives' comparison are not respected.

Signed-off-by: Dhruv Chopra <[email protected]>
@dchopra001 dchopra001 requested a review from dsouzai as a code owner November 27, 2024 18:11
@dchopra001 dchopra001 requested a review from pshipton November 27, 2024 18:12
@dchopra001 dchopra001 changed the title Accelerate StringCoding.hasNegatives on Z (0.49) Accelerate StringCoding.hasNegatives on Z Nov 27, 2024
@pshipton pshipton merged commit 17f0af9 into eclipse-openj9:v0.49.0-release Nov 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants