We are expecting the following test to pass:
public static int Main()
{
var a = new Vector<Vector4>(new Vector4(1));
try
{
a = a + a;
Debug.Assert(false, "unreachable");
}
catch (System.NotSupportedException)
{
}
return 100;
}
but on arm32 it hits the assert, based on @tannergooding analysis it happens because on arm32 we don't have IsHardwareAccelerated, so we go to the else condition in Vector<T> operator +:
https://source.dot.net/#System.Private.CoreLib/Vector.cs,729
and the else branch is missing something like (in my understanding):
else
{
throw new NotSupportedException(SR.Arg_TypeNotSupported);
}
https://source.dot.net/#System.Private.CoreLib/Vector.cs,826
similar to the IsHardwareAccelerated block.
cc @CarolEidt
JitDump confirms that we are not doing addition and just generate `default:
Addition.txt
We are expecting the following test to pass:
but on arm32 it hits the assert, based on @tannergooding analysis it happens because on arm32 we don't have
IsHardwareAccelerated, so we go to the else condition inVector<T> operator +:https://source.dot.net/#System.Private.CoreLib/Vector.cs,729
and the else branch is missing something like (in my understanding):
https://source.dot.net/#System.Private.CoreLib/Vector.cs,826
similar to the
IsHardwareAcceleratedblock.cc @CarolEidt
JitDump confirms that we are not doing addition and just generate `default:
Addition.txt