Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Wasm RyuJit] Add Wasm SIMD NYIs, fix PushArgs assert, fix Async/Try/SCC issue. - #129494

#129494
Merged
AndyAyersMS merged 2 commits into
dotnet:maindotnet/runtime:mainfrom
AndyAyersMS:wasm-scc-isolated-try-entryAndyAyersMS/runtime:wasm-scc-isolated-try-entryCopy head branch name to clipboard
Jun 18, 2026
Merged

[Wasm RyuJit] Add Wasm SIMD NYIs, fix PushArgs assert, fix Async/Try/SCC issue.#129494
AndyAyersMS merged 2 commits into
dotnet:maindotnet/runtime:mainfrom
AndyAyersMS:wasm-scc-isolated-try-entryAndyAyersMS/runtime:wasm-scc-isolated-try-entryCopy head branch name to clipboard

Conversation

@AndyAyersMS

Copy link
Copy Markdown
Member
  • Report SIMD16 local loads as Wasm SIMD NYIs so R2R compilation can skip them when configured.
  • Avoid assuming retbuf call arguments are PUTARG nodes on targets without a fixed register set (Wasm).
  • Add temporary bidirectional edges for isolated async try side entries so SCC rewriting can see them. This handles cases where the in-try resumption target is not reachable from the try entry and throws.

…SCC issue.

- Report unsupported SIMD16 local loads as Wasm SIMD NYIs so R2R compilation can skip them when configured.
- Avoid assuming retbuf call arguments are PUTARG nodes on targets without a fixed register set (Wasm).
- Add temporary bidirectional edges for isolated async try side entries so SCC rewriting can see them.
This handles cases where the in-try resumption target is not reachable from the try entry and throws.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 16, 2026 23:49
@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 Jun 16, 2026
@AndyAyersMS

AndyAyersMS commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

@adamperlin PTAL
fyi @jakobbotsch for the async change
fyi @dotnet/wasm-contrib

Found these while working on async support for Wasm.

I was seeing some SIMD16 leaking into the IR unexpectedly, so added a few more safeguards.

For the Async/Try/SCC change, we had a case where an async resumption target T was in a try and immediately threw, so adding a fake edge from T to the try entry did not create a loop. So we now also add a fake edge from the try entry to T. SCC breakup then ensures that the real flow edge (from method entry to the resumption target) routes through the try header.

@AndyAyersMS
AndyAyersMS requested a review from adamperlin June 16, 2026 23:54

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 updates the CoreCLR JIT (with a focus on the Wasm backend) to (1) treat certain SIMD16 load patterns as Wasm-SIMD NYIs (so R2R compilation can mark methods unsupported when configured), (2) relax an argument-shape assertion for retbuf handling on targets without a fixed register set (Wasm), and (3) adjust try-region temporary edge construction to help SCC-based EH rewriting handle isolated async side entries.

Changes:

  • Prevent 16-byte struct layouts from being treated as SIMD16 register types on Wasm (ClassLayout::GetRegisterType).
  • Add NYI_WASM_SIMD(...) guards for several SIMD16 load shapes in Wasm codegen (lcl var/fld, indir, load-local-into-reg).
  • Add temporary header→dest edges for certain multiple-entry try regions when the side-entry destination isn’t reachable within the try (to form SCCs), and relax the retbuf PUTARG assertion for !fixed-reg-set targets.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/coreclr/jit/layout.h Avoids reporting 16-byte layouts as TYP_SIMD16 register types on Wasm.
src/coreclr/jit/flowgraph.cpp Adds additional temporary edges to help SCC discovery for multiple-entry try regions; includes a comment typo fix.
src/coreclr/jit/codegenwasm.cpp Adds Wasm SIMD NYI reporting for several SIMD16 load paths (with a noted gap for reg-candidate locals).
src/coreclr/jit/codegencommon.cpp Avoids assuming the retbuf arg is always a PUTARG node when HAS_FIXED_REGISTER_SET==0 (Wasm).

Comment thread src/coreclr/jit/flowgraph.cpp Outdated
Comment thread src/coreclr/jit/codegenwasm.cpp
Comment thread src/coreclr/jit/flowgraph.cpp Outdated

@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.

This looks good to me from what I understand, I just had one suggestion for a comment. Thanks for the NYI SIMD fixes.

@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.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AndyAyersMS

Copy link
Copy Markdown
Member Author

/ba-g persistent build timeouts

@AndyAyersMS
AndyAyersMS merged commit a17debe into dotnet:main Jun 18, 2026
133 of 139 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone Jun 19, 2026
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
…SCC issue. (#129494)

- Report SIMD16 local loads as Wasm SIMD NYIs so R2R compilation can
skip them when configured.
- Avoid assuming retbuf call arguments are PUTARG nodes on targets
without a fixed register set (Wasm).
- Add temporary bidirectional edges for isolated async try side entries
so SCC rewriting can see them. This handles cases where the in-try
resumption target is not reachable from the try entry and throws.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.