|
// Now walk the next blocks and see if they are basically the same type of test |
|
for (const BasicBlock* currBb = firstBlock->Next(); currBb != nullptr; currBb = currBb->Next()) |
The switch recognition is currently lexical for (from what I can tell) no good reason. Instead, it seems we should be able to recognize any chain of comparisons by following the "did not equal" target.
cc @dotnet/jit-contrib @JulieLeeMSFT @EgorBo
runtime/src/coreclr/jit/switchrecognition.cpp
Lines 172 to 173 in 7ff684a
The switch recognition is currently lexical for (from what I can tell) no good reason. Instead, it seems we should be able to recognize any chain of comparisons by following the "did not equal" target.
cc @dotnet/jit-contrib @JulieLeeMSFT @EgorBo