@@ -4421,29 +4421,44 @@ private bool notifyInstructionSetUsage(InstructionSet instructionSet, bool suppo
4421
4421
}
4422
4422
else
4423
4423
{
4424
+ // We want explicitly implemented ISimdVector<TSelf, T> APIs to still be expanded where possible
4425
+ // but, they all prefix the qualified name of the interface first, so we'll check for that and
4426
+ // skip the prefix before trying to resolve the method.
4424
4427
ReadOnlySpan < char > methodName = MethodBeingCompiled . Name . AsSpan ( ) ;
4425
4428
4426
- if ( methodName . StartsWith ( "System.Runtime.Intrinsics.ISimdVector<System.Runtime.Intrinsics.Vector " ) )
4429
+ if ( methodName . StartsWith ( "System.Runtime.Intrinsics.ISimdVector<System." ) )
4427
4430
{
4428
- // We want explicitly implemented ISimdVector<TSelf, T> APIs to still be expanded where possible
4429
- // but, they all prefix the qualified name of the interface first, so we'll check for that and
4430
- // skip the prefix before trying to resolve the method.
4431
+ ReadOnlySpan < char > partialMethodName = methodName . Slice ( 45 ) ;
4431
4432
4432
- ReadOnlySpan < char > partialMethodName = methodName . Slice ( 70 ) ;
4433
-
4434
- if ( partialMethodName . StartsWith ( "<T>,T>." ) )
4435
- {
4436
- methodName = partialMethodName . Slice ( 7 ) ;
4437
- }
4438
- else if ( partialMethodName . StartsWith ( "64<T>,T>." ) )
4433
+ if ( partialMethodName . StartWith ( "Numerics.Vector" ) )
4439
4434
{
4440
- methodName = partialMethodName . Slice ( 9 ) ;
4435
+ partialMethodName = partialMethodName . Slice ( 15 ) ;
4436
+
4437
+ if ( partialMethodName . StartsWith ( "<T>,T>." ) )
4438
+ {
4439
+ methodName = partialMethodName . Slice ( 7 ) ;
4440
+ }
4441
4441
}
4442
- else if ( partialMethodName . StartsWith ( "128<T>,T>." ) ||
4443
- partialMethodName . StartsWith ( "256<T>,T>." ) ||
4444
- partialMethodName . StartsWith ( "512<T>,T>." ) )
4442
+ if ( partialMethodName . StartWith ( "Runtime.Intrinsics.Vector" ) )
4445
4443
{
4446
- methodName = partialMethodName . Slice ( 10 ) ;
4444
+ partialMethodName = partialMethodName . Slice ( 25 ) ;
4445
+
4446
+ if ( partialMethodName . StartsWith ( "128<T>,T>." ) ||
4447
+ partialMethodName . StartsWith ( "256<T>,T>." ) ||
4448
+ partialMethodName . StartsWith ( "512<T>,T>." ) )
4449
+ {
4450
+ methodName = partialMethodName . Slice ( 8 ) ;
4451
+ }
4452
+ else if ( partialMethodName . StartsWith ( "64<T>,T>." ) )
4453
+ {
4454
+ methodName = partialMethodName . Slice ( 9 ) ;
4455
+ }
4456
+ else if ( partialMethodName . StartsWith ( "128<T>,T>." ) ||
4457
+ partialMethodName . StartsWith ( "256<T>,T>." ) ||
4458
+ partialMethodName . StartsWith ( "512<T>,T>." ) )
4459
+ {
4460
+ methodName = partialMethodName . Slice ( 10 ) ;
4461
+ }
4447
4462
}
4448
4463
}
4449
4464
0 commit comments