-
Notifications
You must be signed in to change notification settings - Fork 5k
[wasm][aot] Optimize 64 bit const shuffles. Otherwise prefer vector swizzle. #115351
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
base: main
Are you sure you want to change the base?
Conversation
Tagging subscribers to this area: @steveisok, @vitek-karas |
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.
Pull Request Overview
This PR optimizes the implementation of the OP_WASM_SIMD_SWIZZLE operation for constant indices. Key changes include a revised handling of constant versus non‐constant swizzle index vectors, the removal of an early bitcast of rhs, and an updated combination of computed index vectors using a bitwise OR instead of addition.
The codegen for the const case is not pretty but it is roughly equivalent to the old codegen. out of curiosity I checked what the codegen for i64x2 non-const case looks like where llvm synthesizes min
when the intrinsic exists
|
I made it fall back to the old code only for 64x2, but that case should really just be written by hand. |
Fall back to element access for 64x2 const elements, otherwise prefer the vectorized version.