Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Remove fallthrough checks in Compiler::TryLowerSwitchToBitTest #108106

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

amanasifkhalid
Copy link
Member

Part of #107749, and prerequisite to #107634. If we intend to run block layout after lowering, then we shouldn't bother checking for fallthrough during switch lowering -- instead, rely on block layout to create fallthrough from the bit test if it is beneficial.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 22, 2024
Copy link
Contributor

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

@amanasifkhalid
Copy link
Member Author

cc @dotnet/jit-contrib, @AndyAyersMS PTAL. Modest diffs -- this change is creating instances where the BBJ_COND block containing the bit test is not followed by either of its successors. Once we move block layout to the backend, we should be able to fix this when it makes sense to have fallthrough.

@amanasifkhalid
Copy link
Member Author

ping @AndyAyersMS

@amanasifkhalid amanasifkhalid merged commit f72179a into dotnet:main Oct 16, 2024
108 checks passed
@amanasifkhalid amanasifkhalid deleted the bit-test-fallthrough branch October 16, 2024 01:10
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

2 participants