@@ -1412,8 +1412,6 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
14121412 case SN_ConvertToUInt32 :
14131413 case SN_ConvertToUInt64 :
14141414 case SN_ExtractMostSignificantBits :
1415- case SN_GetLower :
1416- case SN_GetUpper :
14171415 case SN_Narrow :
14181416 case SN_Shuffle :
14191417 case SN_ToScalar :
@@ -1422,6 +1420,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
14221420 case SN_WidenLower :
14231421 case SN_WidenUpper :
14241422 return NULL ;
1423+ case SN_GetLower :
1424+ case SN_GetUpper :
1425+ /* These return a Vector64 */
1426+ return NULL ;
14251427 default :
14261428 break ;
14271429 }
@@ -1869,7 +1871,14 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
18691871 MONO_EMIT_NEW_BIALU_IMM (cfg , OP_COMPARE_IMM , -1 , args [1 ]-> dreg , elems );
18701872 MONO_EMIT_NEW_COND_EXC (cfg , GE_UN , "ArgumentOutOfRangeException" );
18711873
1872- if (COMPILE_LLVM (cfg ) || type_to_width_log2 (arg0_type ) == 3 ) {
1874+ gboolean use_xextract ;
1875+ #ifdef TARGET_AMD64
1876+ use_xextract = FALSE;
1877+ #else
1878+ use_xextract = type_to_width_log2 (arg0_type ) == 3 ;
1879+ #endif
1880+
1881+ if (COMPILE_LLVM (cfg ) || use_xextract ) {
18731882 // Use optimized paths for 64-bit extractions or whatever LLVM yields if enabled.
18741883 int extract_op = type_to_xextract_op (arg0_type );
18751884 return emit_simd_ins_for_sig (cfg , klass , extract_op , -1 , arg0_type , fsig , args );
@@ -2184,7 +2193,14 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
21842193 MONO_EMIT_NEW_BIALU_IMM (cfg , OP_COMPARE_IMM , -1 , args [1 ]-> dreg , elems );
21852194 MONO_EMIT_NEW_COND_EXC (cfg , GE_UN , "ArgumentOutOfRangeException" );
21862195
2187- if (COMPILE_LLVM (cfg ) || type_to_width_log2 (arg0_type ) == 3 ) {
2196+ gboolean use_xextract ;
2197+ #ifdef TARGET_AMD64
2198+ use_xextract = FALSE;
2199+ #else
2200+ use_xextract = type_to_width_log2 (arg0_type ) == 3 ;
2201+ #endif
2202+
2203+ if (COMPILE_LLVM (cfg ) || use_xextract ) {
21882204 int insert_op = type_to_xinsert_op (arg0_type );
21892205 MonoInst * ins = emit_simd_ins (cfg , klass , insert_op , args [0 ]-> dreg , args [2 ]-> dreg );
21902206 ins -> sreg3 = args [1 ]-> dreg ;
0 commit comments