Skip to content

[clr-interp] ret instructions are unconditional branches in control flow#120757

Merged
davidwrighton merged 1 commit intodotnet:mainfrom
davidwrighton:ret_is_unconditional_branch
Oct 15, 2025
Merged

[clr-interp] ret instructions are unconditional branches in control flow#120757
davidwrighton merged 1 commit intodotnet:mainfrom
davidwrighton:ret_is_unconditional_branch

Conversation

@davidwrighton
Copy link
Member

ret instructions are similar to unconditional branches in that they do not link to the next block

Copilot AI review requested due to automatic review settings October 15, 2025 18:36
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 control flow handling for return instructions in the CoreCLR interpreter by treating them as unconditional branches that don't link to subsequent blocks.

  • Ensures ret instructions don't incorrectly link to the next basic block
  • Adds linkBBlocks = false after both leave and ret instruction handling

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 15, 2025
Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@davidwrighton davidwrighton merged commit d5c1e52 into dotnet:main Oct 15, 2025
96 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants