Skip to content

Normalize TYP_BYREF to TYP_INT in implicit casts even on x86 - #131442

Draft
adamperlin wants to merge 1 commit into
dotnet:mainfrom
adamperlin:adamperlin/x86-fix-debug-spill-assert
Draft

Normalize TYP_BYREF to TYP_INT in implicit casts even on x86#131442
adamperlin wants to merge 1 commit into
dotnet:mainfrom
adamperlin:adamperlin/x86-fix-debug-spill-assert

Conversation

@adamperlin

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 27, 2026 21:55
@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 Jul 27, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 pipeline(s).
11 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adjusts impImplicitIorI4Cast in the JIT importer so the “pointer-like (ref/byref) -> int” normalization path is no longer accidentally gated to TARGET_64BIT, enabling the same implicit-cast normalization behavior on x86 as well.

Changes:

  • Move the #endif // TARGET_64BIT so the (wantedType == TYP_INT) && varTypeIsI(currType) cast-to-TYP_INT path is compiled on all targets.
  • Preserve the existing 64-bit-only behavior for casting TYP_INT to TYP_I_IMPL when TYP_I_IMPL != TYP_INT.

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