dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.98k stars 4.66k forks source link

Arm64 HWIntrinsics: Immediate methods should be testing with non-constants #108060

Open a74nh opened 1 hour ago

a74nh commented 1 hour ago

There are many APIs with "constant expected" arguments.

eg:

(Vector128<sbyte> Value1, Vector128<sbyte> Value2) LoadAndInsertScalar((Vector128<sbyte>, Vector128<sbyte>) values, [ConstantExpected(Max = (byte)(15))] byte index, sbyte* address)

There are a lack of tests to test passing a non-constant value into the method: eg: we test LoadAndInsertScalar(vectorx, 3, addr); but not LoadAndInsertScalar(vectorx, inty, addr);

In addition, many of the constant values tests use values hardcoded into the script. We have ways of randomly generating values and should do that instead.

dotnet-policy-service[bot] commented 1 hour ago

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.