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 constraint for BBJ_SWITCH -> BBJ_COND conversion #105651

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/coreclr/jit/fgopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1775,12 +1775,10 @@ bool Compiler::fgOptimizeSwitchBranches(BasicBlock* block)

return true;
}
else if ((block->GetSwitchTargets()->bbsCount == 2) &&
block->NextIs(block->GetSwitchTargets()->bbsDstTab[1]->getDestinationBlock()))
else if (block->GetSwitchTargets()->bbsCount == 2)
{
/* Use a BBJ_COND(switchVal==0) for a switch with only one
significant clause besides the default clause, if the
default clause is bbNext */
significant clause besides the default clause */
GenTree* switchVal = switchTree->AsOp()->gtOp1;
noway_assert(genActualTypeIsIntOrI(switchVal->TypeGet()));

Expand Down
Loading