-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[mono][interp] Align simd types to 16 bytes by default #81219
Conversation
Tagging subscribers to this area: @BrzVlad Issue DetailsAll simd interp vars (args, IL locals and other allocated vars) are now aligned to 16 byte offsets, instead of the 8 byte default alignment. We use the general
|
0b8d5f2
to
b4472bc
Compare
b4472bc
to
215d2c3
Compare
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-wasm-libtests |
Azure Pipelines successfully started running 1 pipeline(s). |
215d2c3
to
d07cb1a
Compare
@@ -4167,8 +4187,13 @@ interp_method_compute_offsets (TransformData *td, InterpMethod *imethod, MonoMet | |||
return; | |||
} | |||
} | |||
offset += align - 1; | |||
offset &= ~(align - 1); | |||
MonoClass *klass = mono_class_from_mono_type_internal (header->locals [i]); |
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.
Could be encapsulated if used on multiple occasions
d07cb1a
to
51043ee
Compare
All interp vars (args, il locals and other allocated vars) are now aligned to 16 byte offsets.
Assumption that return offset is identical to location of param offset for this opcode is no longer true. Set the param_offset explicitly, separate from the return, similar to dotnet#81017
51043ee
to
5491767
Compare
All simd interp vars (args, IL locals and other allocated vars) are now aligned to 16 byte offsets, instead of the 8 byte default alignment.
We use the general
MonoClass->simd_type
for now, which encapsulates vectors of all sizes, to determine if we align them. This PR has no benefit by itself, it is just prerequisite for addition of intrisics for vectorized operations, and submitted by itself for independent testing purposes.