Skip to content

Commit

Permalink
[mono] Disable few quaternion intrinsics (#82410)
Browse files Browse the repository at this point in the history
* Disable few quaternion intrinsics

For * and / operators as these are not the same as vector operations.
Opened #82408 to implement
correct ones in future.

* Change comparison order
  • Loading branch information
radekdoulik authored Feb 21, 2023
1 parent 75eac96 commit a9e2538
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 ((id == SN_op_Multiply || id == SN_Multiply || id == SN_op_Division || id == SN_Divide) && !strcmp (klass_name, "Quaternion"))
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 a9e2538

Please sign in to comment.