Repository navigation
[Wasm RyuJit] fix validation error in Microsoft.CodeAnalysis.dll - #130579
Conversation
For enregistered struct init, retype the zero constant to the local's register type. Co-authored-by: Copilot <[email protected]>
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
@adamperlin PTAL With this all the CORE_ROOT assemblies crossgen cleanly and validate, except for some non-codegen issue in xunit.runner.utility.netcoreapp10.dll. |
There was a problem hiding this comment.
Pull request overview
This PR adjusts JIT lowering for struct local stores so that when a zero-initialization is represented as an int constant (GT_CNS_INT(0)), the constant is retyped to the local’s register type on WASM targets (and continues to do the equivalent retyping for SIMD zeros). This avoids generating IR/codegen patterns that violate WASM’s stricter type validation requirements.
Changes:
- Introduce a
retypeZeroToRegTypedecision point forGT_CNS_INT(0)struct stores. - Keep existing SIMD behavior (create a properly-typed SIMD zero) and extend the same idea for WASM by retyping the zero when
lclRegTypediffers from the constant’s type. - Preserve existing behavior for non-WASM targets (except for the small refactor to unify the condition).
|
The non-codegen (maybe that's debatable) issue is #130585. |
…0579) For enregistered struct init, retype the zero constant to the local's register type. Co-authored-by: Copilot <[email protected]>
For enregistered struct init, retype the zero constant to the local's register type.