Skip to content

Conversation

AndyAyersMS
Copy link
Member

@AndyAyersMS AndyAyersMS commented Aug 28, 2025

Fixes #119058.

@Copilot Copilot AI review requested due to automatic review settings August 28, 2025 00:40
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 fixes a JIT assertion failure during inline return value substitution when handling comma operators. The issue occurred when a conditional jump (jtrue) had a comma operation as its condition, causing the JIT to fail during flow graph optimization.

Key changes:

  • Adds handling for comma operations in conditional statements during inline substitution
  • Extracts side effects from comma operations into separate statements
  • Includes a regression test to prevent this issue from reoccurring

Reviewed Changes

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

File Description
src/coreclr/jit/fginline.cpp Adds logic to handle comma operations in jtrue statements by extracting side effects and splicing out the comma
src/tests/JIT/Regression/JitBlue/Runtime_119508/Runtime_119508.cs Regression test that reproduces the original JIT assertion failure scenario
src/tests/JIT/Regression/JitBlue/Runtime_119508/Runtime_119508.csproj Project file for the regression test with optimization enabled

@AndyAyersMS
Copy link
Member Author

@dotnet/jit-contrib PTAL

@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 Aug 28, 2025
Copy link
Contributor

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

@AndyAyersMS
Copy link
Member Author

Also we don't really need to extra all side effects, just tunnel down through until we find a compare or constant. Maybe I should rework this as a split.

@AndyAyersMS
Copy link
Member Author

@EgorBo updated; can you take one more look?

@AndyAyersMS
Copy link
Member Author

@EgorBo ping

@AndyAyersMS AndyAyersMS merged commit 1f8428d into dotnet:main Sep 2, 2025
115 of 118 checks passed
@AndyAyersMS
Copy link
Member Author

/backport to release/10.0

Copy link
Contributor

github-actions bot commented Sep 2, 2025

Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/17407078615

@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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: Assertion failed 'cond == test->AsOp()->gtOp1' during 'Update flow graph early pass'

3 participants