[release/10.0] JIT: Handle writes to promoted locals in AliasSet::AddNode by github-actions[bot] · Pull Request #126939 · dotnet/runtime (original) (raw)
Backport of #126645 to release/10.0
/cc @jakobbotsch
Customer Impact
- 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
- 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.