File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -3384,17 +3384,27 @@ GenTree* Compiler::impIntrinsic(CORINFO_CLASS_HANDLE clsHnd,
3384
3384
3385
3385
if (IsTargetAbi(CORINFO_NATIVEAOT_ABI))
3386
3386
{
3387
- // Intrinsics that we should make every effort to expand for NativeAOT.
3388
- // If the intrinsic cannot possibly be expanded, it's fine, but
3389
- // if it can be, it should expand.
3390
3387
switch (ni)
3391
3388
{
3389
+ // Intrinsics that we should make every effort to expand for NativeAOT.
3390
+ // If the intrinsic cannot possibly be expanded, it's fine, but
3391
+ // if it can be, it should expand.
3392
3392
case NI_System_Runtime_CompilerServices_RuntimeHelpers_CreateSpan:
3393
3393
case NI_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray:
3394
+ betterToExpand = true;
3395
+ break;
3396
+
3397
+ // Intrinsics that we should always expand for NativeAOT. These are
3398
+ // required to be expanded due to ILScanner assumptions.
3394
3399
case NI_Internal_Runtime_MethodTable_Of:
3395
3400
case NI_System_Activator_AllocatorOf:
3396
3401
case NI_System_Activator_DefaultConstructorOf:
3397
- betterToExpand = true;
3402
+ case NI_System_Runtime_CompilerServices_RuntimeHelpers_IsReferenceOrContainsReferences:
3403
+ mustExpand = true;
3404
+ break;
3405
+
3406
+ case NI_System_Runtime_InteropService_MemoryMarshal_GetArrayDataReference:
3407
+ mustExpand |= sig->sigInst.methInstCount == 1;
3398
3408
break;
3399
3409
3400
3410
default:
You can’t perform that action at this time.
0 commit comments