Skip to content

Fix FitsIn(tree->TypeGet(), value) assert #114928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Apr 22, 2025

Fixes #113940

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 22, 2025
@EgorBo
Copy link
Member Author

EgorBo commented Apr 22, 2025

/azp run Fuzzlyn

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

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

@EgorBo EgorBo marked this pull request as ready for review April 25, 2025 17:36
@Copilot Copilot AI review requested due to automatic review settings April 25, 2025 17:36
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 an assertion failure related to FitsIn(tree->TypeGet(), value) by adjusting the condition for casting small variable constants in the assertion propagation logic.

  • Removed the check for op1 being a store-local-var, now applying optCastConstantSmall whenever the local variable type is small.
  • Updates the assertion creation logic in assertionprop.cpp to address the reported issue.
Comments suppressed due to low confidence (1)

src/coreclr/jit/assertionprop.cpp:1245

  • Removing the op1->OperIs(GT_STORE_LCL_VAR) condition could potentially lead to casting being applied in contexts where it was not previously intended. Please verify that this change does not introduce side effects in non-store local variable scenarios by expanding the test coverage if necessary.
if (varTypeIsSmall(lclVar))

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.

JIT: Assertion failed 'FitsIn(tree->TypeGet(), value)' during 'Assertion prop'
1 participant