Skip to content

Commit

Permalink
Disable few quaternion intrinsics
Browse files Browse the repository at this point in the history
For * and / operators as these are not the same as vector operations.
Opened dotnet#82408 to implement
correct ones in future.
  • Loading branch information
radekdoulik committed Feb 20, 2023
1 parent 9ed6d99 commit 0a3eb8f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mono/mono/mini/simd-intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -2111,10 +2111,15 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
case SN_op_Multiply:
case SN_op_Subtraction:
case SN_Max:
case SN_Min:
case SN_Min: {
const char *klass_name = m_class_get_name (klass);
// FIXME https://github.com/dotnet/runtime/issues/82408
if (!strcmp (klass_name, "Quaternion") && (id == SN_op_Multiply || id == SN_Multiply || id == SN_op_Division || id == SN_Divide))
return NULL;
if (!(!fsig->hasthis && fsig->param_count == 2 && mono_metadata_type_equal (fsig->ret, type) && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type)))
return NULL;
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, MONO_TYPE_R4, id);
}
case SN_Dot: {
#if defined(TARGET_ARM64) || defined(TARGET_WASM)
int instc0 = OP_FMUL;
Expand Down

0 comments on commit 0a3eb8f

Please # to comment.