@@ -2141,60 +2141,20 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
21412141 !strcmp ("System" , cmethod_klass_name_space ) &&
21422142 !strcmp ("ThrowHelper" , cmethod_klass_name )) {
21432143
2144- if (!strcmp ("ThrowForUnsupportedNumericsVectorBaseType" , cmethod -> name )) {
2144+ if (!strcmp ("ThrowForUnsupportedNumericsVectorBaseType" , cmethod -> name ) ||
2145+ !strcmp ("ThrowForUnsupportedIntrinsicsVector64BaseType" , cmethod -> name ) ||
2146+ !strcmp ("ThrowForUnsupportedIntrinsicsVector128BaseType" , cmethod -> name ) ||
2147+ !strcmp ("ThrowForUnsupportedIntrinsicsVector256BaseType" , cmethod -> name )) {
21452148 /* The mono JIT can't optimize the body of this method away */
21462149 MonoGenericContext * ctx = mono_method_get_context (cmethod );
21472150 g_assert (ctx );
21482151 g_assert (ctx -> method_inst );
21492152
21502153 MonoType * t = ctx -> method_inst -> type_argv [0 ];
2151- switch (t -> type ) {
2152- case MONO_TYPE_I1 :
2153- case MONO_TYPE_U1 :
2154- case MONO_TYPE_I2 :
2155- case MONO_TYPE_U2 :
2156- case MONO_TYPE_I4 :
2157- case MONO_TYPE_U4 :
2158- case MONO_TYPE_I8 :
2159- case MONO_TYPE_U8 :
2160- case MONO_TYPE_R4 :
2161- case MONO_TYPE_R8 :
2162- case MONO_TYPE_I :
2163- case MONO_TYPE_U :
2154+ if (MONO_TYPE_IS_VECTOR_PRIMITIVE (t )) {
21642155 MONO_INST_NEW (cfg , ins , OP_NOP );
21652156 MONO_ADD_INS (cfg -> cbb , ins );
21662157 return ins ;
2167- default :
2168- break ;
2169- }
2170- }
2171- else if (!strcmp ("ThrowForUnsupportedIntrinsicsVector64BaseType" , cmethod -> name ) ||
2172- !strcmp ("ThrowForUnsupportedIntrinsicsVector128BaseType" , cmethod -> name ) ||
2173- !strcmp ("ThrowForUnsupportedIntrinsicsVector256BaseType" , cmethod -> name )) {
2174- /* The mono JIT can't optimize the body of this method away */
2175- MonoGenericContext * ctx = mono_method_get_context (cmethod );
2176- g_assert (ctx );
2177- g_assert (ctx -> method_inst );
2178-
2179- MonoType * t = ctx -> method_inst -> type_argv [0 ];
2180- switch (t -> type ) {
2181- case MONO_TYPE_I1 :
2182- case MONO_TYPE_U1 :
2183- case MONO_TYPE_I2 :
2184- case MONO_TYPE_U2 :
2185- case MONO_TYPE_I4 :
2186- case MONO_TYPE_U4 :
2187- case MONO_TYPE_I8 :
2188- case MONO_TYPE_U8 :
2189- case MONO_TYPE_R4 :
2190- case MONO_TYPE_R8 :
2191- case MONO_TYPE_I :
2192- case MONO_TYPE_U :
2193- MONO_INST_NEW (cfg , ins , OP_NOP );
2194- MONO_ADD_INS (cfg -> cbb , ins );
2195- return ins ;
2196- default :
2197- break ;
21982158 }
21992159 }
22002160 }
0 commit comments