Updating Vector*.IsHardwareAccelerated to be recursive (#69578)
authorTanner Gooding <tagoo@outlook.com>
Sat, 17 Sep 2022 20:16:17 +0000 (13:16 -0700)
committerGitHub <noreply@github.com>
Sat, 17 Sep 2022 20:16:17 +0000 (13:16 -0700)
commitb40c3a3ba575babb4c0409eb5cbb9b728b1ba9c2
treedfe4299d1988d3dc9ff6f6782e512cc0b209518c
parentf45df0d1977966010e829474024e8e862f6ed199
Updating Vector*.IsHardwareAccelerated to be recursive (#69578)

* Updating Vector*.IsHardwareAccelerated to be recursive so it works in the debugger

* Adding tests validating indirect and direct invocation of get_IsHardwareAccelerated return the same value

* Ensure that Vector<T>.IsHardwareAccelerated supports being recursive

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs

* Detect the one legal violation of the behaves the same rule for intrinsics in CoreLib
- The functions which detect if an intrinsic is actually available are allowed to have behavior which differs based on which intrinsics are available at runtime

* [mono] Intrinsify IsHardwareAccelerated in the interpreter.

* Add a fallback path for unhandled recursive intrinsics in System.Numerics

* Move the Vector.IsHardwareAccelerated handling into SimdAsHWIntrinsicInfo.lookupId

* Fixinng a compiler error due to an unresolved member

* Adjust the NI_IsSupported_Dynamic checks to be NAOT only

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: David Wrighton <davidwr@microsoft.com>
Co-authored-by: Zoltan Varga <vargaz@gmail.com>
15 files changed:
src/coreclr/jit/compiler.h
src/coreclr/jit/hwintrinsic.cpp
src/coreclr/jit/importer.cpp
src/coreclr/jit/simdashwintrinsic.cpp
src/coreclr/jit/simdashwintrinsic.h
src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs
src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs
src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs
src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs
src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs
src/mono/mono/mini/interp/transform.c