runtime: COMPlus_EnableHWIntrinsic=0 no longer disables SSE+
In .NET Core 3.0/3.1 setting COMPlus_EnableHWIntrinsic=0
would disable all HWIntrinsics. That is, it would mark the shared helper intrinsics (Vector64
, Vector128
, and Vector256
) as unsupported and would also cause any platform specific intrinsics (SSE+
on x86) to be unsupported.
However, in the current master branch, setting this only disables the shared helper intrinsics. We should likely clean this up so that the previous behavior stays the same.
That being said, it might be beneficial to change how it was functioning as compared to .NET Core 3.1 (I had logged a bug for this a while back: https://github.com/dotnet/runtime/issues/11701). That is, rather than having EnableHWIntrinsic
also having the compiler report that the compiler doesn’t support SSE+, we should instead just have it only impact the creation of HWIntrinsic
nodes. We could do this via a similar mechanism to FeatureSIMD
which currently has a bool featureSIMD
field and which uses that to early exit from the impSIMDIntrinsic
code paths and we could additionally add it as an assert to gtNewSimdHWIntrinsic
and gtNewScalarHWIntrinsic
methods.
This would allow the compiler to continue reporting and keying off of what ISAs the hardware supports regardless of whether the user has HWIntrinsics enabled/disabled.
category:testing theme:intrinsics skill-level:intermediate cost:medium
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (15 by maintainers)
The approach seems reasonable, though with https://github.com/dotnet/runtime/pull/35421 it would be good to understand (and document) how the two features (SIMD and HWIntrinsic) cooperate.