ARM64-SVE: Detect mask usage for Across functions
ConditionalSelect is used to mask an API. For methods that reduce down to a scalar value (eg all the Across methods), this would be done via:
a = Sve.AddAcross(Sve.ConditionalSelect(mask, a, zero));
Currently this will produce an SEL instruction to select the correct entries. Then will feed this into an
SADDV (or UADDV) that uses an all-true mask.
Instead, the SEL needs merging into the SADDV to produce a single SADDV instruction using the mask.
See https://github.com/dotnet/runtime/issues/101770 for history.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.
https://github.com/dotnet/runtime/pull/104640 falls in similar category.
priority:3 for RC1 snap : Performance issue. Produces code that is not ideal, but will not break anything.
Given the backporting that would be required, I think it's too risky for NET9