Skip to content

JIT: Avoid running return value copy logic for unused return value #115687

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 1 commit into from
May 19, 2025

Conversation

jakobbotsch
Copy link
Member

Fix #115669

Also opened #115686 as a related optimization in the area.

@Copilot Copilot AI review requested due to automatic review settings May 17, 2025 19:06
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 optimizes the JIT by ensuring that return value copy logic is only executed when the return value is actually used.

  • Added an additional null check for callDefInfo.DefinitionNode before copying the return value
  • This change prevents unnecessary copy operations for unused return values

@jakobbotsch
Copy link
Member Author

jakobbotsch commented May 19, 2025

cc @dotnet/jit-contrib PTAL @AndyAyersMS

I'm not going to add regression tests for these initial issues that Fuzzlyn is finding since I think Fuzzlyn's coverage will be enough (and there will be a number of simple things found).

@jakobbotsch jakobbotsch requested a review from AndyAyersMS May 19, 2025 13:07
@jakobbotsch jakobbotsch merged commit 2122be9 into dotnet:main May 19, 2025
107 of 110 checks passed
@jakobbotsch jakobbotsch deleted the fix-115669 branch May 19, 2025 18:08
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 runtime-async
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JIT: Assertion failed 'callDefInfo.DefinitionNode != nullptr' during 'Transform async'
2 participants