[Wasm RyuJIT] Set wasm's vector width to 128 bits#126375
Open
kg wants to merge 2 commits intodotnet:mainfrom
Open
[Wasm RyuJIT] Set wasm's vector width to 128 bits#126375kg wants to merge 2 commits intodotnet:mainfrom
kg wants to merge 2 commits intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
There was a problem hiding this comment.
Pull request overview
Sets the WebAssembly (Wasm32) target’s Vector<T> SIMD width to a concrete 128-bit size during toolchain compilation, avoiding LayoutInt.AsInt failures (indeterminate size) when crossgen2 computes Wasm signatures and dependency analysis for Vector<T>.
Changes:
- Update
InstructionSetSupport.GetVectorTSimdVector()to returnSimdVectorLength.Vector128BitforTargetArchitecture.Wasm32(previouslyNone).
This was referenced Apr 1, 2026
Open
Member
Author
|
@dotnet/jit-contrib PTAL |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/coreclr/tools/aot/crossgen2/Program.cs:95
- The rationale here (“no Wasm client-side jit”) seems to apply to WASI targets as well. As-is,
allowOptimisticwill remain enabled by default forTargetOS.Wasi, which can reintroduce the same class of issues this change is trying to avoid. Consider extending the condition to includeTargetOS.Wasi(or basing it ontargetArchitecture == TargetArchitecture.Wasm32rather than OS).
if (targetOS is TargetOS.iOS or TargetOS.tvOS or TargetOS.iOSSimulator or TargetOS.tvOSSimulator or TargetOS.MacCatalyst or TargetOS.Browser)
{
// These platforms do not support jitted code, so we want to ensure that we don't
// need to fall back to the interpreter for any hardware-intrinsic optimizations.
// Disable optimistic instruction sets by default.
allowOptimistic = false;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a late compilation failure in crossgen when doing dependency analysis for
Vector<T>in S.P.CoreLib:Also includes a related change Andy suggested to disable being optimistic about instruction sets, since we don't have a Wasm client-side jit.
See also #125756