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

Omit unnecessary AMD64 TEST instruction #8539

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

petermz
Copy link
Contributor

@petermz petermz commented Mar 7, 2024

This is inspired by similar change in JDK. When a TEST instruction immediately follows one of AND/OR/XOR, it may be left out because the necessary flags (SF, ZF) are already set.

This patch might probably be structured better, and extended to support more cases. But first I'd just like to check if the approach taken is sane and overall makes sense, so I'd appreciate comments and criticisms.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Mar 7, 2024
@fniephaus fniephaus requested a review from davleopo March 7, 2024 16:26
@fniephaus
Copy link
Member

Thanks for the PR, @petermz! Could you please fix the style issues?

@petermz
Copy link
Contributor Author

petermz commented Mar 11, 2024

Sure, fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants