Repository navigation
Preserve ARM64 flags dependencies during indirection reordering - #135575
Merged
Merged
Conversation
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Co-authored-by: EgorBo <[email protected]>
Copilot
AI
changed the title
[WIP] Fix ARM64 JIT stale flags issue for k % 2
Preserve ARM64 flags dependencies during indirection reordering
Oct 10, 2026
EgorBo
marked this pull request as ready for review
October 10, 2026 21:20
EgorBo
approved these changes
Oct 10, 2026
Member
|
PTAL @dotnet/jit-contrib no diffs |
Member
|
PTAL @adamperlin |
JulieLeeMSFT
approved these changes
Oct 13, 2026
EgorBo
enabled auto-merge (squash)
October 14, 2026 02:17
2 of 4 tasks
JulieLeeMSFT
pushed a commit
that referenced
this pull request
Oct 19, 2026
…eordering (#136083) Fixes Issue #135521 <!-- Issue Number --> main PR #135575 <!-- Link to PR if any that fixed this in the main branch. --> # Description <!-- Give a brief summary of the issue and how the pull request is fixing it. --> Backport of #135575 to release/11.0. Preserve implicit flags dependencies when reordering ARM64 stores and post-indexed addressing. The regression test is adapted to the release branch's existing merged runner. # Customer Impact <!-- What is the impact to customers of not taking this fix? --> - [x] Customer reported - [ ] Found internally ARM64 code can compute incorrect signed remainder results after an allocation. For example, `k % 2` can return `-1` for a non-negative odd value. # Regression <!-- Is this fixing a problem that was introduced in the most recent release, ie., fixing a regression? --> - [ ] Yes - [x] No Not introduced in .NET 11. Wrong results are reported on .NET 10; the underlying instruction-ordering bug is also present in .NET 9. # Testing <!-- What kind of testing has been done with the fix. --> Test is added. # Risk <!-- Please assess the risk of taking this fix. Provide details backing up your assessment. --> Low. Only prevents reordering across implicit flags dependencies. Co-authored-by: Copilot <[email protected]> Co-authored-by: Copilot <[email protected]> Copilot-Session: 293a4931-e666-4c2c-bf85-571092949275
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ARM64 store-pair reordering can move
cnegbefore itscmp, causingk % 2to read stale allocation-helper flags. On .NET 10, non-negative odd inputs can consequently produce-1.MarkTreetracks only explicit operands.intandlongremainder with negative, zero, and boundary inputs.stp: one additional instruction and four bytes per method.k % 2reads stale flags after an allocation (cnegemitted before itscmp), wrong results on .NET 10 #135521