From 76138ba8d50957e99dc41e960f282a8ec1c372eb Mon Sep 17 00:00:00 2001 From: Sergey Andreenko Date: Thu, 3 Sep 2020 09:50:32 -0700 Subject: [PATCH] Mark sizeValue as non faulting. (#41776) The address of the ind can't be null because it is a prejited location. However, the value of the indirection could be different, so should not mark as invariant. --- src/coreclr/src/jit/importer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/coreclr/src/jit/importer.cpp b/src/coreclr/src/jit/importer.cpp index f03f639..0c0b67e 100644 --- a/src/coreclr/src/jit/importer.cpp +++ b/src/coreclr/src/jit/importer.cpp @@ -2223,6 +2223,7 @@ GenTree* Compiler::impRuntimeLookupToTree(CORINFO_RESOLVED_TOKEN* pResolvedToken GenTreeIntCon* sizeOffset = gtNewIconNode(pRuntimeLookup->sizeOffset, TYP_I_IMPL); GenTree* sizeValueOffset = gtNewOperNode(GT_ADD, TYP_I_IMPL, lastIndOfTree, sizeOffset); GenTree* sizeValue = gtNewOperNode(GT_IND, TYP_I_IMPL, sizeValueOffset); + sizeValue->gtFlags |= GTF_IND_NONFAULTING; // sizeCheck fails if sizeValue < pRuntimeLookup->offsets[i] GenTree* offsetValue = gtNewIconNode(pRuntimeLookup->offsets[pRuntimeLookup->indirections - 1], TYP_I_IMPL); -- 2.7.4