diff --git a/src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs b/src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs index a655f54590dc0..e1579185a4297 100644 --- a/src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs +++ b/src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs @@ -855,7 +855,6 @@ public void VectorSingleEqualsNaNTest() } [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/74781", TestRuntimes.Mono)] public void VectorDoubleEqualsNonCanonicalNaNTest() { // max 8 bit exponent, just under half max mantissa @@ -880,7 +879,6 @@ public void VectorDoubleEqualsNonCanonicalNaNTest() } [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/74781", TestRuntimes.Mono)] public void VectorSingleEqualsNonCanonicalNaNTest() { // max 11 bit exponent, just under half max mantissa diff --git a/src/mono/mono/mini/mini-amd64.c b/src/mono/mono/mini/mini-amd64.c index bc4eedd8f86c5..bfede8ad36c7f 100644 --- a/src/mono/mono/mini/mini-amd64.c +++ b/src/mono/mono/mini/mini-amd64.c @@ -3882,8 +3882,16 @@ mono_arch_lowering_pass (MonoCompile *cfg, MonoBasicBlock *bb) case OP_XEQUAL: { int temp_reg1 = mono_alloc_ireg (cfg); int temp_reg2 = mono_alloc_ireg (cfg); + int opcode= -1; + switch (ins->inst_c1) + { + case MONO_TYPE_R4: opcode = OP_COMPPS; break; + case MONO_TYPE_R8: opcode = OP_COMPPD; break; + default: opcode = OP_PCMPEQD; + } - NEW_SIMD_INS (cfg, ins, temp, OP_PCMPEQD, temp_reg1, ins->sreg1, ins->sreg2); + NEW_SIMD_INS (cfg, ins, temp, opcode, temp_reg1, ins->sreg1, ins->sreg2); + temp->inst_c0 = 0; NEW_SIMD_INS (cfg, ins, temp, OP_EXTRACT_MASK, temp_reg2, temp_reg1, -1); temp->type = STACK_I4; NEW_INS (cfg, ins, temp, OP_COMPARE_IMM); diff --git a/src/mono/mono/mini/simd-intrinsics.c b/src/mono/mono/mini/simd-intrinsics.c index 62f0b073851c2..27e69070eaab8 100644 --- a/src/mono/mono/mini/simd-intrinsics.c +++ b/src/mono/mono/mini/simd-intrinsics.c @@ -492,7 +492,10 @@ emit_xequal (MonoCompile *cfg, MonoClass *klass, MonoInst *arg1, MonoInst *arg2) else return emit_simd_ins (cfg, klass, OP_XEQUAL, arg1->dreg, arg2->dreg); #else - return emit_simd_ins (cfg, klass, OP_XEQUAL, arg1->dreg, arg2->dreg); + MonoInst *ins = emit_simd_ins (cfg, klass, OP_XEQUAL, arg1->dreg, arg2->dreg); + if (!COMPILE_LLVM (cfg)) + ins->inst_c1 = mono_class_get_context (klass)->class_inst->type_argv [0]->type; + return ins; #endif }