Rewrite gtIsVtableAccess to avoid assert
authorAndy Ayers <andya@microsoft.com>
Tue, 26 Jul 2016 21:19:20 +0000 (14:19 -0700)
committerAndy Ayers <andya@microsoft.com>
Tue, 26 Jul 2016 21:19:20 +0000 (14:19 -0700)
commit498a1d7a0c98f758eed1318930c52fea4ff11509
treed972723365b6e300d60d3b024de5783229798433
parent5ca02e27c7ba137258c5dad306b10ab26d7c95fc
Rewrite gtIsVtableAccess to avoid assert

Calling `HasIndex` from `gtIsVtableAccess` can leads to asserts as the
underly code checks to see if the addressing sub-expressions are
contained. But earlyProp runs early enough that it is not concerned with
containment. The code just needs to verify that there is a ref type base
and no index. Rework the code to do the checks directly.

Commit migrated from https://github.com/dotnet/coreclr/commit/43e5f18ff826058a4de71491a378e5b94ecec919
src/coreclr/src/jit/earlyprop.cpp