Skip to content

Fix Mono rotation folding across basic blocks - #137284

Merged
BrzVlad merged 1 commit into
dotnet:mainfrom
Genbox:bugfix/fix-mono-conditional-rotation
Nov 11, 2026
Merged

BrzVlad merged 1 commit into
dotnet:mainfrom
Genbox:bugfix/fix-mono-conditional-rotation

Conversation

@Genbox

@Genbox Genbox commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #137279

Require the preceding constant instruction to belong to the current basic block before specializing BitOperations.RotateLeft/RotateRight.

Without this check, a conditional rotation count can be replaced with a constant from another block, producing incorrect results.

Validation:

  • Rebuilt v10.0.14 control: 14/20 checks pass.
  • Patched v10.0.14: 20/20 pass under Chromium and Node, including with jiterpreter tiers and general optimizations disabled.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 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: @vitek-karas, @BrzVlad, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Nov 10, 2026

@BrzVlad BrzVlad 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!

@BrzVlad

BrzVlad commented Nov 11, 2026

Copy link
Copy Markdown
Member

/ba-g failure unrelated

@BrzVlad
BrzVlad merged commit 5c84f21 into dotnet:main Nov 11, 2026
82 of 84 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Codegen-Interpreter-mono 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.

[Mono][interpreter] Conditional BitOperations rotation counts are folded across basic blocks

2 participants