@@ -681,16 +681,28 @@ static gboolean
681681emit_sn_vector_t (TransformData * td , MonoMethod * cmethod , MonoMethodSignature * csignature , gboolean newobj )
682682{
683683 const char * cmethod_name = cmethod -> name ;
684+ bool explicitly_implemented = false;
684685
685686 if (strncmp (cmethod_name , "System.Runtime.Intrinsics.ISimdVector<System.Numerics.Vector<T>,T>." , 67 ) == 0 ) {
686687 // We want explicitly implemented ISimdVector<TSelf, T> APIs to still be expanded where possible
687688 // but, they all prefix the qualified name of the interface first, so we'll check for that and
688689 // skip the prefix before trying to resolve the method.
689690
690691 cmethod_name += 67 ;
692+ explicitly_implemented = true;
691693 }
692694
695+
696+
693697 int id = lookup_intrins (sn_vector_t_methods , sizeof (sn_vector_t_methods ), cmethod_name );
698+ if (id == -1 ) {
699+ if (explicitly_implemented ) {
700+ return emit_sri_vector128 (td , cmethod , csignature );
701+ } else {
702+ return FALSE;
703+ }
704+ }
705+
694706 if (id == -1 )
695707 return FALSE;
696708
@@ -1067,9 +1079,7 @@ interp_emit_simd_intrinsics (TransformData *td, MonoMethod *cmethod, MonoMethodS
10671079 else if (!strcmp (class_name , "Vector128`1" ))
10681080 return emit_sri_vector128_t (td , cmethod , csignature );
10691081 } else if (!strcmp (class_ns , "System.Numerics" )) {
1070- if (!strcmp (class_name , "Vector" ))
1071- return emit_sri_vector128 (td , cmethod , csignature );
1072- else if (!strcmp (class_name , "Vector`1" ))
1082+ if (!strcmp (class_name , "Vector`1" ))
10731083 return emit_sn_vector_t (td , cmethod , csignature , newobj );
10741084 else if (!strcmp (class_name , "Vector4" ))
10751085 return emit_sn_vector4 (td , cmethod , csignature , newobj );
0 commit comments