Skip to content

Conversation

jakobbotsch
Copy link
Member

The failing test in #118006 casts addresses of locals to small types, and this check was not checking the right type to filter out those casts.

Fix #118006

@Copilot Copilot AI review requested due to automatic review settings July 24, 2025 12:19
@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 24, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

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 fixes a bug in the JIT compiler's cast type checking logic when dealing with address casts. The issue was that the code was incorrectly checking the node's type instead of the cast's target type when filtering out casts of local addresses to small types.

  • Replaces direct type checking with proper cast target type validation
  • Adds proper code block structure around the GT_CAST case
  • Fixes the logic to correctly identify pointer-type casts

Copy link
Contributor

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

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @EgorBo

@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr superpmi-diffs

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jakobbotsch
Copy link
Member Author

Had to push another commit to check for TYP_U_IMPL as well.

@jakobbotsch jakobbotsch merged commit c58b659 into dotnet:main Jul 25, 2025
110 checks passed
@jakobbotsch jakobbotsch deleted the fix-118006 branch July 25, 2025 17:43
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

Test failure: JIT/IL_Conformance/Old/directed/ldloca_s_i1/ldloca_s_i1.dll
2 participants