Skip to content

[Wasm RyuJIT]: Remove more unreachable NYI_WASM entries - #132170

Merged
adamperlin merged 1 commit into
dotnet:mainfrom
adamperlin:adamperlin/wasm-remove-more-nyi
Aug 12, 2026
Merged

adamperlin merged 1 commit into
dotnet:mainfrom
adamperlin:adamperlin/wasm-remove-more-nyi

Conversation

@adamperlin

Copy link
Copy Markdown
Contributor

This also involves moving some HAS_FIXED_REGISTER_SET ifdefs around as well as moving the definition of genUpdateVarReg to codegencommon.

Copilot AI lite review requested due to automatic review settings August 11, 2026 21:35
@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 Aug 11, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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

Removes additional unreachable NYI_WASM paths in the JIT’s WASM target, tightens HAS_FIXED_REGISTER_SET conditionals around spill-related code, and centralizes CodeGenInterface::genUpdateVarReg into shared code.

Changes:

  • Wrap spill handling (genSpillVar and its call sites) in #if HAS_FIXED_REGISTER_SET to avoid WASM-only NYI stubs.
  • Replace NYI_WASM fallbacks in WASM ins_Load / ins_Store with unreached().
  • Move the multi-reg CodeGenInterface::genUpdateVarReg implementation into codegencommon.cpp and remove WASM NYI stubs.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/coreclr/jit/treelifeupdater.cpp Gates spill-triggered codegen callbacks behind HAS_FIXED_REGISTER_SET.
src/coreclr/jit/instr.cpp Replaces WASM NYI fallbacks with unreached() and gates instGen_Set_Reg_To_Zero.
src/coreclr/jit/codegenwasm.cpp Removes WASM NYI stubs for spill/update-var-reg and tightens overflow assumptions for float→int cast codegen.
src/coreclr/jit/codegenlinear.cpp Switches spill support gating from !TARGET_WASM to HAS_FIXED_REGISTER_SET and removes moved genUpdateVarReg definition.
src/coreclr/jit/codegeninterface.h Makes genSpillVar only part of the interface when HAS_FIXED_REGISTER_SET is true.
src/coreclr/jit/codegencommon.cpp Adds shared implementation of multi-reg genUpdateVarReg.
src/coreclr/jit/codegen.h Gates genSpillVar and fixed-register helpers behind HAS_FIXED_REGISTER_SET.
Suppressed comments (1)

src/coreclr/jit/instr.cpp:2936

  • instGen_Set_Reg_To_Zero is now excluded when HAS_FIXED_REGISTER_SET is 0 (e.g. TARGET_WASM defines it as 0), but shared code (e.g. CodeGen::genGetZeroReg in codegencommon.cpp) still references it on WASM. That will lead to missing symbol/link or compile failures for WASM builds. Either keep a WASM implementation (even if it’s just local-set to zero) or ensure all callers are also under #if HAS_FIXED_REGISTER_SET.
#if HAS_FIXED_REGISTER_SET
/*****************************************************************************
 *
 *  Machine independent way to move a Zero value into a register
 */

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@adamperlin
adamperlin marked this pull request as ready for review August 11, 2026 23:56
@adamperlin
adamperlin requested a review from AndyAyersMS August 11, 2026 23:57
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@adamperlin
adamperlin merged commit e53147e into dotnet:main Aug 12, 2026
131 checks passed
@adamperlin
adamperlin deleted the adamperlin/wasm-remove-more-nyi branch August 12, 2026 17:36
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Aug 13, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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.

3 participants