Skip to content

JIT: postorder local assertion prop for fieldwise block op indirs#118368

Merged
AndyAyersMS merged 1 commit intodotnet:mainfrom
AndyAyersMS:Fix115789
Aug 8, 2025
Merged

JIT: postorder local assertion prop for fieldwise block op indirs#118368
AndyAyersMS merged 1 commit intodotnet:mainfrom
AndyAyersMS:Fix115789

Conversation

@AndyAyersMS
Copy link
Copy Markdown
Member

After we form the block op field indirs, run postorder local assertion prop on them, so that they see the same amount of assertion prop as other indirs.

Fixes (parts of) #115789.

After we form the block op field indirs, run postorder local assertion
prop on them, so that they see the same amount of assertion prop as
other indirs.

Fixes (parts of) dotnet#115789.
@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 5, 2025
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

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

@AndyAyersMS
Copy link
Copy Markdown
Member Author

Diffs are fairly extensive. Overall a decent net improvement.

Might be too much churn at this point in the release?

@dotnet/jit-contrib thoughts?

@jakobbotsch
Copy link
Copy Markdown
Member

Diffs are fairly extensive. Overall a decent net improvement.

Might be too much churn at this point in the release?

@dotnet/jit-contrib thoughts?

I guess we have some time to deal with potential fall out / back out the change depending on the micro benchmark results. Seems ok to me if you want to get it in.

@AndyAyersMS
Copy link
Copy Markdown
Member Author

Ok let's consider taking this then.

@AndyAyersMS AndyAyersMS marked this pull request as ready for review August 5, 2025 15:23
Copilot AI review requested due to automatic review settings August 5, 2025 15:23
Copy link
Copy Markdown
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 enhances the JIT compiler's block operation handling by adding postorder local assertion propagation to fieldwise block operation indirect accesses. The purpose is to ensure that these field indirections receive the same level of optimization as other indirect accesses in the compiler.

  • Adds a lambda function that performs postorder local assertion propagation
  • Applies this optimization to both source field reads and destination field stores during field-by-field copying
  • Relaxes type checking to allow mismatched types when the source field is an integer constant

Comment thread src/coreclr/jit/morphblock.cpp
Comment thread src/coreclr/jit/morphblock.cpp
Comment thread src/coreclr/jit/morphblock.cpp
Copy link
Copy Markdown
Member

@jakobbotsch jakobbotsch left a comment

Choose a reason for hiding this comment

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

Would suggest running Fuzzlyn on this.

@AndyAyersMS
Copy link
Copy Markdown
Member Author

/azp run Fuzzlyn

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@AndyAyersMS
Copy link
Copy Markdown
Member Author

There is a fuzzlyn failure on x86:

Assertion failed 'isContainable || supportsRegOptional' in 'Program:M16(byte)' during 'Generate code' (IL size 72; hash 0x646d3daa; FullOpts)

likely something pre-existing, but let me dig in.

@AndyAyersMS
Copy link
Copy Markdown
Member Author

Was pre-existing, opened #118466

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.

[Perf] Windows/x64: 7 Regressions on 5/16/2025 10:16:17 PM +00:00

3 participants