Skip to content

JIT: Remove overzealous async assert #115883

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

jakobbotsch
Copy link
Member

The store can come from a STORE_LCL_FLD, so in reality there is no relation between the type of the resultLcl and the call type. The code below handles STORE_LCL_FLD correctly, so just remove the assert.

Fix #115839

The store can come from a `STORE_LCL_FLD`, so in reality there is no
relation between the type of the resultLcl and the call type. The code
below handles `STORE_LCL_FLD` correctly, so just remove the assert.
@Copilot Copilot AI review requested due to automatic review settings May 22, 2025 09:21
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 removes an overzealous assert in the async transformation logic that mistakenly assumes the structure type of the result local variable matches the call’s return type, even when the store originates from a STORE_LCL_FLD.

  • Removed a redundant assert in async.cpp
  • Clarified handling of STORE_LCL_FLD scenarios to prevent incorrect assumptions
Comments suppressed due to low confidence (1)

src/coreclr/jit/async.cpp:1540

  • Consider adding a brief comment here to explain why this assertion was removed, particularly highlighting that STORE_LCL_FLD may yield a different relation between result local type and call return type.
assert(varTypeIsStruct(resultLcl) == varTypeIsStruct(call->gtReturnType));

@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 May 22, 2025
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

PTAL @dotnet/jit-contrib

@jakobbotsch jakobbotsch requested a review from a team May 22, 2025 15:21
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
2 participants