Skip to content

[Wasm RyuJit] codegen for small structs #125199

@AndyAyersMS

Description

@AndyAyersMS
N006 (???,???) [000027] -----+-----                   t27 =    CNS_INT   int    0
                                                            /--*  t6     int    arg3 $3
                                                            +--*  t9     int    gctx $2
                                                            +--*  t26    int    wasm sp $0
                                                            +--*  t25    int    r2r cell $1
                                                            +--*  t27    int    wasm pep $4
N007 (???,???) [000007] --CXG+-----                    t7 = *  CALL r2r_ind int    System.Runtime.CompilerServices.ObjectHandleOnStack:Create[System.__Canon](byref):System.Runtime.CompilerServices.ObjectHandleOnStack
                                                            /--*  t7     int
N008 (???,???) [000016] DACXG+-----                         *  STORE_LCL_VAR struct<System.Runtime.CompilerServices.ObjectHandleOnStack, 4> V10 tmp3

This blows up under RewriteLocalStackStore because of the int/struct mix.

To repro, try crossgenning a wasm SPC with rsp file like the following:

--targetos:browser
--targetarch:wasm
--obj-format=wasm
--codegenopt:JitDump=Ctor
--singlemethodtypename:"System.Array" 
--singlemethodname:"Ctor" 
--singlemethodindex:2
-r:"c:\repos\runtime2\artifacts\tests\coreclr\browser.wasm.Debug\Tests\Core_Root\*.dll"
"c:\repos\runtime2\artifacts\tests\coreclr\browser.wasm.Debug\Tests\Core_Root\System.Private.CoreLib.dll"

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIuntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions