Skip to content
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

JIT: Fix Lowering::LowerRange #113172

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Mar 5, 2025

For example, this would break when LowerNode ended up deciding to remove the current node.

To make this fully robust we now insert a sentinel node and stop when we get to it. Using lastNode->gtNext as the sentinel node would seemingly be possible, but we have code that removes the user of the node being lowered, which would not work in that scenario:

LIR::Use superUse;
if (BlockRange().TryGetUse(user, &superUse))
{
superUse.ReplaceWith(op2);
}
else
{
op2->SetUnusedValue();
}
.

For example, this would break when `LowerNode` ended up deciding to
remove the current node.
@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 Mar 5, 2025
Copy link
Contributor

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

@jakobbotsch jakobbotsch marked this pull request as ready for review March 6, 2025 09:13
@Copilot Copilot bot review requested due to automatic review settings March 6, 2025 09:13

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

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.

1 participant