Skip to content

Conversation

@kg
Copy link
Member

@kg kg commented Jan 28, 2026

No description provided.

@kg kg added arch-wasm WebAssembly architecture area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Jan 28, 2026
@dotnet-policy-service
Copy link
Contributor

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

@kg
Copy link
Member Author

kg commented Jan 28, 2026

Not sure what i'm doing wrong here yet.


*************** Starting PHASE Lowering nodeinfo
compEnregLocals() is false, setting doNotEnreg flag for all locals.
Local V00 should not be enregistered because: opts.compFlags & CLFLG_REGVAR is not set

Local V01 should not be enregistered because: opts.compFlags & CLFLG_REGVAR is not set

Local V02 should not be enregistered because: opts.compFlags & CLFLG_REGVAR is not set

Local V03 should not be enregistered because: opts.compFlags & CLFLG_REGVAR is not set
BB02: already in WASM value stack order
lowering store lcl var/field (before):
N001 (???,???) [000002] -----+-----                    t2 =    CNS_INT   int    0
                                                            /--*  t2     int    
N002 (???,???) [000003] DA---+-----                         *  STORE_LCL_VAR struct<Program+S, 16> V03 loc1         


Local V03 should not be enregistered because: written/read in a block op
lowering store lcl var/field (after):
N001 (???,???) [000002] -----+-----                    t2 =    CNS_INT   int    0
               [000012] D----------                   t12 =    LCL_ADDR  byref  V03 loc1         [+0]
                                                            /--*  t12    byref  
                                                            +--*  t2     int    
N002 (???,???) [000003] sA---+-----                         *  STORE_BLK struct<Program+S, 16> (init)


Local V03 should not be enregistered because: written/read in a block op
lowering return node
N001 (???,???) [000007] -----+-----                         *  RETURN    void  
============


Program:copyStruct(ptr) - NYI (Z:\runtime\src\coreclr\jit\lowerwasm.cpp:476 - NYI_WASM: IR not in a stackified form)
Z:\runtime\src\coreclr\jit\lowerwasm.cpp:476
Assertion failed 'NYI_WASM: IR not in a stackified form' in 'Program:copyStruct(ptr)' during 'Lowering nodeinfo' (IL size 17; hash 0xce1e49ee; MinOpts)

{
blkNode->gtBlkOpKind = GenTreeBlk::BlkOpKindLoop;
src->SetContained();
// memory.fill
Copy link
Member

@EgorBo EgorBo Jan 29, 2026

Choose a reason for hiding this comment

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

in this case it's expected to emit a loop of pointer-sized stores (with 0 value) to guarantee atomicity for gc slots (which memset does not guarantee), I am not sure it's a problem today for WASM, but it's probably better to maintain that

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.

2 participants