Skip to content

JIT: Always intersect exception sets of defs #116007

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 3 commits into from
May 27, 2025

Conversation

jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented May 27, 2025

The existing logic would only intersect the exception sets of subsequent defs if it had also seen a use. That meant for a list of [DEF, DEF, USE] CSE candidates we would only validate that the first def's exception set was sufficient for the use.

Fix #112848

The existing logic would only intersect the exception sets of subsequent
defs if it had also seen a use. That meant for a list of DEF, DEF, USE
CSEs candidates we would only validate that the first def's exception
sets were sufficient for the use.
@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 May 27, 2025
@jakobbotsch jakobbotsch marked this pull request as ready for review May 27, 2025 14:50
Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

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

Interesting that there are a handful of diffs.

@jakobbotsch
Copy link
Member Author

Interesting that there are a handful of diffs.

I haven't dug in to check if some of those are actual bugs or not. Since this logic isn't aware of reaching defs it is overly conservative.

It seems like we could insert into SSA earlier to make use of that information for this check.

@jakobbotsch jakobbotsch merged commit d709a73 into dotnet:main May 27, 2025
114 of 116 checks passed
@jakobbotsch jakobbotsch deleted the fix-112848 branch May 27, 2025 15:38
@jakobbotsch
Copy link
Member Author

Forgot to cc @dotnet/jit-contrib. Diffs are mainly regressions where we no longer CSE.

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.

Test failure: global::JitTest_castclass_ldloc_cs.TestClass.TestEntryPoint()
2 participants