Skip to content

Commit

Permalink
Mark sizeValue as non faulting. (#41814)
Browse files Browse the repository at this point in the history
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.

Co-authored-by: Sergey Andreenko <seandree@microsoft.com>
  • Loading branch information
github-actions[bot] and Sergey Andreenko authored Sep 8, 2020
1 parent 98dd097 commit 64f1b41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/coreclr/src/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 64f1b41

Please sign in to comment.