Skip to content

JIT: Preserve publication ordering when eliding GC write barriers - #137869

Merged
EgorBo merged 1 commit into
dotnet:mainfrom
NinoFloris:jit/nongc-publication-order
Nov 25, 2026
Merged

EgorBo merged 1 commit into
dotnet:mainfrom
NinoFloris:jit/nongc-publication-order

Conversation

@NinoFloris

@NinoFloris NinoFloris commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #137868

repro, new codegen:

str   w1, [x0, #8]
stlur x0, [x1, #16]
stlur x0, [x1, #24]

A mutable nongc object can reach a store through a local or phi. When assertion propagation proves that the value needs no GC barrier, retain release ordering on the store instead of relying on lowering to recognize a literal object handle. Marking the store before address lowering also permits release-store instructions.
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Nov 18, 2026
@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 Nov 18, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@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.

@EgorBo EgorBo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, makes sense to me

@EgorBo
EgorBo enabled auto-merge (squash) November 25, 2026 02:05
@EgorBo

EgorBo commented Nov 25, 2026

Copy link
Copy Markdown
Member

/ba-g deadletter

@EgorBo
EgorBo merged commit 5d3ed0f into dotnet:main Nov 25, 2026
136 of 139 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 26, 2026
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 community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JIT: (bug) NativeAOT can omit release ordering when publishing mutable objects in non-GC storage

2 participants