-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Closed
Copy link
Milestone
Description
Repro:
#95588
[Fact]
public void Vector128SByteAbs_MinValue()
{
Vector128<sbyte> vector = Vector128.Create(sbyte.MinValue);
Vector128<sbyte> abs = Vector128.Abs(vector);
for (int index = 0; index < Vector128<sbyte>.Count; index++)
{
Assert.Equal(sbyte.MinValue, vector.GetElement(index));
}
}
This test passes on coreclr. On mono it fails with:
System.Runtime.Intrinsics.Tests.Vectors.Vector128Tests.Vector128SByteAbs_MinValue [FAIL]
System.OverflowException : Negating the minimum value of a twos complement number is invalid.
Stack Trace:
/_/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs(163,0): at System.Runtime.Intrinsics.Tests.Vectors.Vector128Tests.Vector128SByteAbs_MinValue()
/_/src/mono/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.Mono.cs(22,0): at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
/_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs(57,0): at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
This is the source of the test failures in #94555 (comment).