Skip to content

Commit

Permalink
Revert "JIT: Skip switch recognition for handles (dotnet#104634)"
Browse files Browse the repository at this point in the history
This reverts commit cd9cc87.
  • Loading branch information
matouskozak committed Jul 11, 2024
1 parent d5d0e7b commit 572014a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreclr/jit/switchrecognition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ bool IsConstantTestCondBlock(const BasicBlock* block,
}

// We're looking for "X EQ/NE CNS" or "CNS EQ/NE X" pattern
if ((op1->IsCnsIntOrI() && !op1->IsIconHandle()) ^ (op2->IsCnsIntOrI() && !op2->IsIconHandle()))
if (op1->IsCnsIntOrI() ^ op2->IsCnsIntOrI())
{
// TODO: relax this to support any side-effect free expression
if (!op1->OperIs(GT_LCL_VAR) && !op2->OperIs(GT_LCL_VAR))
Expand Down

0 comments on commit 572014a

Please sign in to comment.