When the jit is optimizing type equality and inequality tests, it may run into the following case:
object.GetType() == typeof(X)
This can usually be optimized into a comparison of the object's method table pointer versus a known method table address. But historically that has not always been a valid optimization. So the jit calls canInlineTypeCheckWithObjectVTable to identify the cases where the optimization is valid.
https://github.com/dotnet/coreclr/blob/3c01252879f2d2223f63d5b222b6584c28fc07f4/src/jit/gentree.cpp#L13141-L13147
Per Jan's comments in #10332, it seems in CoreCLR this optimization is likely always valid and the check is no longer needed.
category:cq
theme:basic-cq
skill-level:intermediate
cost:small
When the jit is optimizing type equality and inequality tests, it may run into the following case:
This can usually be optimized into a comparison of the object's method table pointer versus a known method table address. But historically that has not always been a valid optimization. So the jit calls
canInlineTypeCheckWithObjectVTableto identify the cases where the optimization is valid.https://github.com/dotnet/coreclr/blob/3c01252879f2d2223f63d5b222b6584c28fc07f4/src/jit/gentree.cpp#L13141-L13147
Per Jan's comments in #10332, it seems in CoreCLR this optimization is likely always valid and the check is no longer needed.
category:cq
theme:basic-cq
skill-level:intermediate
cost:small