Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -834,15 +834,13 @@ private void TestEqualsVector<T>() where T : struct, INumber<T>
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void VectorDoubleEqualsNaNTest()
{
var nan = new Vector<double>(double.NaN);
Assert.True(nan.Equals(nan));
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void VectorSingleEqualsNaNTest()
{
var nan = new Vector<float>(float.NaN);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,6 @@ public void Matrix3x2IsIdentityTest()

// A test for Matrix3x2 comparison involving NaN values
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void Matrix3x2EqualsNaNTest()
{
Matrix3x2 a = new Matrix3x2(float.NaN, 0, 0, 0, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2490,7 +2490,6 @@ public void Matrix4x4From3x2Test()

// A test for Matrix4x4 comparison involving NaN values
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void Matrix4x4EqualsNaNTest()
{
Matrix4x4 a = new Matrix4x4(float.NaN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
Expand Down
1 change: 0 additions & 1 deletion src/libraries/System.Numerics.Vectors/tests/PlaneTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ public void PlaneTransformTest2()

// A test for Plane comparison involving NaN values
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void PlaneEqualsNaNTest()
{
Plane a = new Plane(float.NaN, 0, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,6 @@ public void QuaternionIsIdentityTest()

// A test for Quaternion comparison involving NaN values
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void QuaternionEqualsNaNTest()
{
Quaternion a = new Quaternion(float.NaN, 0, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,6 @@ public void Vector2EqualsTest1()

// A test for Vector2f comparison involving NaN values
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void Vector2EqualsNaNTest()
{
Vector2 a = new Vector2(float.NaN, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,6 @@ public void Vector3ConstructorTest5()

// A test for Vector3f comparison involving NaN values
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void Vector3EqualsNaNTest()
{
Vector3 a = new Vector3(float.NaN, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,6 @@ public void Vector4ConstructorTest6()

// A test for Vector4f comparison involving NaN values
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void Vector4EqualsNaNTest()
{
Vector4 a = new Vector4(float.NaN, 0, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4446,15 +4446,13 @@ public void Vector128Int64IndexerTest(params long[] values)
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void Vector128DoubleEqualsNaNTest()
{
Vector128<double> nan = Vector128.Create(double.NaN);
Assert.True(nan.Equals(nan));
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void Vector128SingleEqualsNaNTest()
{
Vector128<float> nan = Vector128.Create(float.NaN);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3867,15 +3867,13 @@ public void Vector64Int64IndexerTest(params long[] values)
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void Vector64DoubleEqualsNaNTest()
{
Vector64<double> nan = Vector64.Create(double.NaN);
Assert.True(nan.Equals(nan));
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69424", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void Vector64SingleEqualsNaNTest()
{
Vector64<float> nan = Vector64.Create(float.NaN);
Expand Down
27 changes: 0 additions & 27 deletions src/mono/mono/mini/simd-intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,6 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
}

static guint16 vector64_vector128_t_methods [] = {
SN_Equals,
SN_get_AllBitsSet,
SN_get_Count,
SN_get_IsSupported,
Expand Down Expand Up @@ -1463,7 +1462,6 @@ emit_vector64_vector128_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
}

MonoClass *klass = cmethod->klass;
MonoType *type = m_class_get_byval_arg (klass);
MonoType *etype = mono_class_get_context (klass)->class_inst->type_argv [0];
int size = mono_class_value_size (klass, NULL);
int esize = mono_class_value_size (mono_class_from_mono_type_internal (etype), NULL);
Expand Down Expand Up @@ -1508,13 +1506,6 @@ emit_vector64_vector128_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
case SN_get_AllBitsSet: {
return emit_xones (cfg, klass);
}
case SN_Equals: {
if (fsig->param_count == 1 && fsig->ret->type == MONO_TYPE_BOOLEAN && mono_metadata_type_equal (fsig->params [0], type)) {
int sreg1 = load_simd_vreg (cfg, cmethod, args [0], NULL);
return emit_simd_ins (cfg, klass, OP_XEQUAL, sreg1, args [1]->dreg);
}
break;
}
case SN_op_Addition:
case SN_op_BitwiseAnd:
case SN_op_BitwiseOr:
Expand Down Expand Up @@ -1563,7 +1554,6 @@ static guint16 vector2_methods[] = {
SN_Abs,
SN_CopyTo,
SN_Dot,
SN_Equals,
SN_GetElement,
SN_Max,
SN_Min,
Expand Down Expand Up @@ -1783,12 +1773,6 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
ins->inst_c1 = MONO_TYPE_R4;
return ins;
}
case SN_Equals: {
if (!(fsig->param_count == 1 && mono_metadata_type_equal (fsig->params [0], type)))
return NULL;
int sreg1 = load_simd_vreg (cfg, cmethod, args [0], NULL);
return emit_simd_ins (cfg, klass, OP_XEQUAL, sreg1, args [1]->dreg);
}
case SN_op_Equality:
if (!(fsig->param_count == 2 && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type)))
return NULL;
Expand Down Expand Up @@ -1894,7 +1878,6 @@ emit_sys_numerics_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSigna
static guint16 vector_t_methods [] = {
SN_ctor,
SN_CopyTo,
SN_Equals,
SN_GreaterThan,
SN_GreaterThanOrEqual,
SN_LessThan,
Expand Down Expand Up @@ -2079,16 +2062,6 @@ emit_sys_numerics_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig
return ins;
}
break;
case SN_Equals:
if (fsig->param_count == 1 && fsig->ret->type == MONO_TYPE_BOOLEAN && mono_metadata_type_equal (fsig->params [0], type)) {
int sreg1 = load_simd_vreg (cfg, cmethod, args [0], NULL);

return emit_simd_ins (cfg, klass, OP_XEQUAL, sreg1, args [1]->dreg);
} else if (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)) {
/* Per element equality */
return emit_xcompare (cfg, klass, etype->type, args [0], args [1]);
}
break;
case SN_op_Equality:
case SN_op_Inequality:
g_assert (fsig->param_count == 2 && fsig->ret->type == MONO_TYPE_BOOLEAN &&
Expand Down