dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.01k stars 4.67k forks source link

ARM64-SVE: Don't assume MOVPRFX #107134

Open a74nh opened 3 weeks ago

a74nh commented 3 weeks ago

See here and the following comments.

LSRA will always delay free operands for a RMW operand embedded in a conditional select. One reason for this is to ensure the generated instruction does not use the destination register in other operations. This is because the architecture will not allow this if the instruction is prefixed by a MOVPRFX.

LSRA should instead determine if a MOVPRFX will be used and avoid delay freeing if possible.

dotnet-policy-service[bot] commented 3 weeks ago

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.

kunalspathak commented 4 days ago

movprfx happens at the codegen time, but we could add hints in the intrinsic table to call out which instructions can have movprfx and then LSRA can use that information to decide if it should delay free or not.

kunalspathak commented 4 days ago

We will see if there are any examples where we produce sub-optimal code and then prioritize this item.