Skip to content

JIT: fix profile update when folding a switch with shared case targets - #134974

Merged
EgorBo merged 1 commit into
dotnet:mainfrom
EgorBo:jit-fix-134896
Oct 1, 2026
Merged

EgorBo merged 1 commit into
dotnet:mainfrom
EgorBo:jit-fix-134896

Conversation

@EgorBo

@EgorBo EgorBo commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Duplicate jump table entries share a FlowEdge, so decreasing target weights per jump table slot subtracted the same edge weight multiple times. Decrease weights once per unique successor edge instead.Fixes #134896

Diffs

Duplicate jump table entries share a FlowEdge, so decreasing target weights
per jump table slot subtracted the same edge weight multiple times. Decrease
weights once per unique successor edge instead.

Fixes dotnet#134896

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 30, 2026
@azure-pipelines

Copy link
Copy Markdown
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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@EgorBo
EgorBo requested a review from adamperlin September 30, 2026 20:42
@EgorBo

EgorBo commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

PTAL @adamperlin @dotnet/jit-contrib no diffs

@EgorBo
EgorBo merged commit f748779 into dotnet:main Oct 1, 2026
144 of 146 checks passed
@EgorBo
EgorBo deleted the jit-fix-134896 branch October 1, 2026 10:34
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JIT: (bug) folding a constant switch with a shared case target zeroes the target's profile weight ("Inconsistent profile data" assert)

2 participants