diff options
-rw-r--r-- | src/jit/earlyprop.cpp | 10 | ||||
-rw-r--r-- | src/mscorlib/model.xml | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/jit/earlyprop.cpp b/src/jit/earlyprop.cpp index 0d760513f8..54404d2b61 100644 --- a/src/jit/earlyprop.cpp +++ b/src/jit/earlyprop.cpp @@ -238,6 +238,16 @@ bool Compiler::optEarlyPropRewriteTree(GenTreePtr tree) } else if (gtIsVtableRef(tree)) { + // Don't propagate type handles that are used as null checks, which are usually in + // form of + // * stmtExpr void (top level) + // \--* indir int + // \--* lclVar ref V02 loc0 + if (compCurStmt->gtStmt.gtStmtExpr == tree) + { + return false; + } + objectRefPtr = tree->gtOp.gtOp1; propKind = optPropKind::OPK_OBJ_GETTYPE; } diff --git a/src/mscorlib/model.xml b/src/mscorlib/model.xml index 3df9be9713..5b114cf3fa 100644 --- a/src/mscorlib/model.xml +++ b/src/mscorlib/model.xml @@ -3580,6 +3580,7 @@ <Member Name="GetCustomAttributes(System.Boolean)" /> <Member Name="GetCustomAttributes(System.Type,System.Boolean)" /> <Member Name="GetExecutingAssembly" /> + <Member Name="GetEntryAssembly" /> <Member Name="GetExportedTypes" Condition="FEATURE_LEGACYNETCF" /> <Member Name="GetManifestResourceNames" /> <Member Name="GetManifestResourceStream(System.String)" /> @@ -8417,6 +8418,7 @@ <Member Name="IsPointerImpl" /> <Member Name="IsPrimitiveImpl" /> <Member Name="IsSubclassOf(System.Type)" /> + <Member Name="IsEquivalentTo(System.Type)" /> <Member Name="IsValueTypeImpl" /> <Member Name="MakeArrayType" Condition="FEATURE_LEGACYNETCF" /> <Member Name="MakeArrayType(System.Int32)" Condition="FEATURE_LEGACYNETCF" /> |