Skip to content

Conversation

@jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Nov 12, 2025

We would leave GTF_VAR_DEATH set if it had already been set on the node from a previous run of liveness.

In the issue that resulted in TreeLifeUpdater computing the wrong liveness set resulting in us not saving a live local around a suspension.

Fix #121552

We would leave `GTF_VAR_DEATH` set if it had already been set on the
node from a previous run of liveness.
Copilot AI review requested due to automatic review settings November 12, 2025 15:13
@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 Nov 12, 2025
@dotnet-policy-service
Copy link
Contributor

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

Copilot finished reviewing on behalf of jakobbotsch November 12, 2025 15:15
Copy link
Contributor

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 issue #121552 by ensuring the GTF_VAR_DEATH flag is properly reset during liveness analysis when it may run multiple times. The fix addresses a case where the flag could remain set from a previous liveness analysis run, leading to incorrect behavior.

Key Changes:

  • Added code to clear GTF_VAR_DEATH flag in fgComputeLifeTrackedLocalDef when a variable is determined to be live
  • This mirrors the existing pattern already present in the companion function fgComputeLifeTrackedLocalUse

@jakobbotsch
Copy link
Member Author

PTAL @dotnet/jit-contrib. We have this kind of flag clearing in other places in liveness, but looks like this place missed it.

@jakobbotsch jakobbotsch requested a review from a team November 12, 2025 17:16
@jakobbotsch
Copy link
Member Author

/ba-g Timeouts

@jakobbotsch jakobbotsch merged commit 2e20682 into dotnet:main Nov 13, 2025
115 of 122 checks passed
@jakobbotsch jakobbotsch deleted the fix-121552 branch November 13, 2025 12:49
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: Bad codegen with runtime async

2 participants