Skip to content

Wasm R2R Pri0 Codegen Issues #129497

@AndyAyersMS

Description

@AndyAyersMS

Summary

Tracking issue for Wasm R2R codegen failures found while running browser-wasm Pri0 tests with Crossgen2 enabled, after all the recent EH changes have landed.

Failure classes

  • LSRA: GT_FRAME_SIZE treated as a binary node

    • Assert: m_node->OperIsBinary()
    • Phase: Linear scan register alloc
    • This is just a simple oversight, fix is trivial.
  • Wasm control flow: missing EH index

    • Assert: block->hasHndIndex() == true
    • Phase: Wasm control flow
    • This is an orphaned dont-remove throw block in a try; it ends up being placed in the wrong spot in the linearized flow. Fix is to try harder to remove these hard to remove things, or find a way to tolerate them.
  • Wasm transform SCCs: bitset bounds assert

    • Assert: i < BitSetTraits::GetSize(env)
    • Phase: Wasm transform sccs
    • This is an unreachable try, these are also hard to remove and cause similar problems to the unreachable blocks in a try.
  • Lowering nodeinfo: local address containment assert

    • Assert: lclVarAddr->isContained() || !varDsc->lvTracked || varTypeIsStruct(varDsc)
    • Phase: Lowering nodeinfo
    • Not sure what this is yet. Perhaps we can suppress the assert, which seems to be concerned with emitter GC liveness tracking. Perhaps not.

Repro instructions below.

Note

This issue was created with assistance from GitHub Copilot.

Metadata

Metadata

Labels

Priority:1Work that is critical for the release, but we could probably ship withoutarea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions