You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SVE: Reuse ptrue value instead of rematerializing it everytime #114286
Either we can track the number of usages (probably count separate groups that do not cross call boundary) and then store them as LclVar. We could have a dedicated predicate register to represent ptrue value, but we would need to have different registers depending on the type (ptrue p0.b and ptrue p0.d are different).
Activity
ghost added
needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
One option would be to assign local var with a dedicated lclNum (similar to how it is done in #105348) when we do CreateTrueAllMask(type) during lowering and LSRA should keep the values in register. The lclNum need to be different based on type, and it should kill those lclNum at call boundary to avoid storing and restoring the predicate registers on stack.
Activity
kunalspathak commentedon Apr 4, 2025
@dotnet/arm64-contrib
dotnet-policy-service commentedon Apr 4, 2025
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
kunalspathak commentedon Apr 7, 2025
One of the problems is that we introduce bunch of them in lowering and hence VN or CSE cannot do anything about it. Here is one the sample dump:
1239.dump.asm.zip
kunalspathak commentedon Apr 7, 2025
One option would be to assign local var with a dedicated lclNum (similar to how it is done in #105348) when we do
CreateTrueAllMask(type)during lowering and LSRA should keep the values in register. The lclNum need to be different based on type, and it should kill those lclNum at call boundary to avoid storing and restoring the predicate registers on stack.kunalspathak commentedon May 30, 2025
We won't have time to do it in .NET 10
a74nh commentedon Jun 11, 2025
#115566 makes all ptrues into CNS_MASK nodes. That should be a large step in the right direction for this issue.