Uh oh!
There was an error while loading. Please reload this page.
JIT: Handle writes to promoted locals in AliasSet::AddNode - #126645
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
There was a problem hiding this comment.
Pull request overview
This PR updates CoreCLR JIT alias tracking so that writes involving promoted locals (and their promoted field locals) are treated as interfering with related locals, preventing incorrect transformations that can lead to wrong codegen on arm64 (as in #126414).
Changes:
- Extend
AliasSet::AddNodeto treat writes to promoted struct-field locals as writes to the parent promoted local. - Extend
AliasSet::AddNodeto treat writes to a promoted parent local as writes to all of its promoted field locals.
Uh oh!
There was an error while loading. Please reload this page.
jakobbotsch
commented
Apr 9, 2026
cc @dotnet/jit-contrib PTAL @EgorBo |
jakobbotsch
commented
Apr 9, 2026
/azp run runtime-coreclr superpmi-diffs |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jakobbotsch
commented
Apr 15, 2026
Uh oh!
There was an error while loading. Please reload this page.
jakobbotsch
commented
Apr 15, 2026
/backport to release/10.0 |
Started backporting to |
…dNode` (#126939) Backport of #126645 to release/10.0 /cc @jakobbotsch ## Customer Impact - [x] Customer reported - [ ] Found internally The JIT may incorrectly reorder two stores in a way that results in computing a wrong result. This was observed on arm64 during its optimization that tries to combine adjacent stores, but the bug is in a common helper function and can potentially be hit on all targets. Reported by customer in #126414. ## Regression - [X] Yes - [ ] No The bug is in a common helper function, but the arm64 adjacent store optimization that exposed it was introduced in .NET 10. ## Testing Unit test added. ## Risk Low. Tighten the utility function that determines reordering legality. --------- Co-authored-by: Jakob Botsch Nielsen <jakob.botsch.nielsen@gmail.com>
Fix#126414
No test since the repro case requires reverting unrelated changes that hid the issue on main.
Codegen diff (with some PRs reverted to repro the original problem on main):