Skip to content

[wasm] Bail R2R for SIMD16 store-indirect and SIMD16 parameters#130101

Merged
AndyAyersMS merged 1 commit into
dotnet:mainfrom
AndyAyersMS:fix-wasm-simd16-store-param-bail
Jul 2, 2026
Merged

[wasm] Bail R2R for SIMD16 store-indirect and SIMD16 parameters#130101
AndyAyersMS merged 1 commit into
dotnet:mainfrom
AndyAyersMS:fix-wasm-simd16-store-param-bail

Conversation

@AndyAyersMS

Copy link
Copy Markdown
Member

Fix a few missing SIMD bail outs that prevent SPC from validating.

Vector128 parameters are lowered to i32 in the wasm signature and a
SIMD16 store-indirect emits v128.store with an i32 operand, both of
which produce invalid modules; bail such methods to the interpreter
via NYI_WASM_SIMD until SIMD16 is properly supported.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AndyAyersMS AndyAyersMS requested review from adamperlin and Copilot July 1, 2026 22:47
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 1, 2026
@AndyAyersMS

Copy link
Copy Markdown
Member Author

@adamperlin PTAL
fyi @dotnet/wasm-contrib

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds additional WebAssembly (wasm) SIMD-related “not yet implemented” bailouts in CoreCLR JIT codegen to avoid generating invalid wasm modules (notably in ReadyToRun scenarios) when TYP_SIMD16 values flow through unsupported code paths.

Changes:

  • Bail out when a method has TYP_SIMD16 (Vector128) parameters, since they are currently represented as i32 in the wasm signature.
  • Bail out when emitting an indirect store of a TYP_SIMD16 value to avoid producing invalid v128.store sequences.

Comment thread src/coreclr/jit/codegenwasm.cpp

@adamperlin adamperlin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These fixes look good to me for now!

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants