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

x64: Implement some minor optimizations related to SIMD lowerings #8839

Merged
merged 3 commits into from
Jun 19, 2024

Conversation

alexcrichton
Copy link
Member

These help a benchmark I was taking a look at by ~7%. Not major but seemed like nice and relatively easy cleanups.

This commit implements lowering optimizations for the `vall_true` and
`vany_true` CLIF instructions when combined with `brif`. This is in the
same manner as `icmp` and `fcmp` combined with `brif` where the result
of the comparison is never materialized into a general purpose register
which helps lower register pressure and remove some instructions.
This has a single-instruction lowering which doesn't load from memory so
it's probably cheaper than loading all-ones from memory.
@alexcrichton alexcrichton requested review from a team as code owners June 19, 2024 03:53
@alexcrichton alexcrichton requested review from elliottt and removed request for a team June 19, 2024 03:53
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen labels Jun 19, 2024
Copy link
Collaborator

@abrown abrown left a comment

Choose a reason for hiding this comment

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

Makes sense to me from the CLIF output tests though I'm a bit surprised this wasn't already the case (?). The nest of ISLE rules are getting harder to read (in general, not due to this PR)...

@alexcrichton alexcrichton added this pull request to the merge queue Jun 19, 2024
Merged via the queue into bytecodealliance:main with commit ee9e1ca Jun 19, 2024
48 checks passed
@alexcrichton alexcrichton deleted the minor-x64-opts branch June 19, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:x64 Issues related to x64 codegen cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants