Skip to content

JIT: Don't allow retyping of casts containing a memory load #114602

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

Merged
merged 3 commits into from
Apr 14, 2025

Conversation

saucecontrol
Copy link
Member

@saucecontrol saucecontrol commented Apr 13, 2025

Fixes #114573

Cast nodes can contain a memory load of a same-size or smaller type provided they would either both sign extend or zero extend. In lowering CreateScalar intrinsics of small types, we attempt to retype a same-size cast to unsigned to force zero-extension. This is invalid if the cast is containing a sign-extending load.

This disables the invalid retyping.

No diffs

@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 13, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 13, 2025
Copy link
Contributor

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

@am11
Copy link
Member

am11 commented Apr 13, 2025

#114603 to fix the formatting break.

@BruceForstall BruceForstall merged commit ce1978f into dotnet:main Apr 14, 2025
114 of 117 checks passed
@saucecontrol saucecontrol deleted the fix-114573 branch April 14, 2025 22:55
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 community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JIT: Assertion failed 'varTypeIsUnsigned(srcLoadType) || (genTypeSize(srcLoadType) >= genTypeSize(castType))'
4 participants