Skip to content

[Wasm RyuJit] Match how other targets consume initblk fill values#129062

Open
AndyAyersMS wants to merge 1 commit into
dotnet:mainfrom
AndyAyersMS:fix-wasm-initval-leaf-assert-solo
Open

[Wasm RyuJit] Match how other targets consume initblk fill values#129062
AndyAyersMS wants to merge 1 commit into
dotnet:mainfrom
AndyAyersMS:fix-wasm-initval-leaf-assert-solo

Conversation

@AndyAyersMS
Copy link
Copy Markdown
Member

genConsumeOperands(blkOp) routed the contained GT_INIT_VAL through genConsumeRegs and tripped its OperIsLeaf assert. Replace the call with explicit consume of dest and the unwrapped src, as other targets do.

genConsumeOperands(blkOp) routed the contained GT_INIT_VAL through
genConsumeRegs and tripped its OperIsLeaf assert. Replace the call with
explicit consume of dest and the unwrapped src, as other targets do.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 6, 2026 01:04
@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 6, 2026
@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.

@AndyAyersMS
Copy link
Copy Markdown
Member Author

@dotnet/wasm-contrib PTAL
fyi @dotnet/jit-contrib

Fixes some pri0 asserts (case 2 here: #128234 (comment))

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 WASM RyuJIT codegen for GT_STORE_BLK so that when the initblk fill value is wrapped in a contained GT_INIT_VAL, codegen consumes the wrapped value (gtGetOp1()) instead of routing the GT_INIT_VAL wrapper through genConsumeRegs (which asserts on non-leaf contained nodes in codegenlinear.cpp).

Changes:

  • Replace genConsumeOperands(blkOp) with explicit consumption of dest and an unwrapped src when src is a contained GT_INIT_VAL.
  • Add an assertion documenting the invariant that GT_INIT_VAL should be contained in this path.

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

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.

2 participants