Repository navigation
[release/11.0] JIT: validate RBO relop rewrite operands - #134347
Merged
Merged
Conversation
Ensure dominating RBO only rewrites the remaining predicate when the VN relop operands match the concrete tree operands. Add coverage for materialized predicates in both relational directions. Fixes #133558. Validation: - `JIT.opt` `RedundantBranchSimplify`: 35 passed - SuperPMI: no asm diffs in 987,559 Windows x64 Checked contexts; 908 identical misses > [!NOTE] > This PR description was generated with GitHub Copilot CLI. Co-authored-by: Copilot <[email protected]>
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 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 |
Member
|
@dotnet/jit-contrib ptal |
JulieLeeMSFT
approved these changes
Sep 21, 2026
Member
|
/ba-g failures is #117138 |
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.
Backport of #133621 to release/11.0
/cc @AndyAyersMS
Customer Impact
The JIT can rewrite a materialized Boolean predicate using value-number operands that do not correspond to the actual tree operands, producing wrong code. The reported case returns
0unconditionally when the correct result is1. This reproduces on .NET 11 RC2; .NET 8, 9, and 10 are correct. See #133558.Regression
Introduced during the .NET 11 cycle by the redundant-branch relop simplification added in #127181.
Testing
Added regression coverage for materialized predicates in both relational directions. All 35
JIT.optRedundantBranchSimplifytests passed. Windows x64 Checked SuperPMI produced no assembly differences in 987,559 successful compilations, with 908 identical misses.Risk
Low. The change adds a validation check before performing the existing rewrite. When the value-number operands do not match the concrete tree operands, the JIT conservatively skips the optimization. SuperPMI found no code-generation changes outside the new regression cases.