runtime
runtime copied to clipboard
Refactor handling of two immediates in hwintrinsic
Out of all the existing hwintrinsics, only NI_AdvSimd_Arm64_InsertSelectedScalar has two immediate values. This also has the property that both immediates are of the same type, therefore handling of the type information and type checking can be simplified for the second immediate.
For Sve, SaturatingIncrementBy*ElementCount, SaturatingDecrementBy*ElementCount, and MultiplyAddRotateComplexBySelectedScalar all require two immediate values. In addition for the Saturating functions, the immediates have different types.
This PR refactors the existing handling so that it will work for Sve. It does not add any new Sve intrinsics.
- Move checks for specific intrinsics out of common code into Arm64 files
- Handle the type the second immediate separately to the type of the first.
The code still feels a little clunky, but I hope impHWIntrinsic() is much easier to parse now.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.
@kunalspathak @tannergooding @dotnet/arm64-contrib This is ready. A perquisite for SaturatingIncrementBy*ElementCount
/azp run runtime-coreclr superpmi-replay, runtime-coreclr superpmi-diffs
Azure Pipelines successfully started running 2 pipeline(s).