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
where there are narrow stores and then a wide load.
We likely need smarter struct copy logic to avoid creating this sort of thing. Might be a simple within-block tracking of how we last accessed a struct would be sufficient? Eg if we "just" wrote to a field then copying field-wise is possibly better for perf.
Activity
dotnet-policy-service commentedon Oct 31, 2025
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
EgorBo commentedon Oct 31, 2025
I noticed it when I ran Linux perf over my PR in EgorBot/runtime-utils#532 and it pointed to https://gist.github.com/EgorBot/19b903e35a57cbd60eb6e6a346b5006b#file-diff_asm_1de7cfc7-asm-L22
EgorBo commentedon Oct 31, 2025
cc @dotnet/jit-contrib
gfoidl commentedon Nov 1, 2025
Another difference is that stack cookie that isn't emitted for the InlineArray variant (cf. godbolt).
So another memory read / write.
EgorBo commentedon Nov 1, 2025
Right, but I already checked that it doesn't play the key part here (if I add it for InlineArray it doesn't change the results)
AndyAyersMS commentedon Nov 7, 2025
llvm-mca analysis of a snipped from the slow case:
After further review llvm-mca does not model store forwarding, so it's analysis here is a pure latency guess.
AndyAyersMS commentedon Nov 9, 2025
Further profiling strongly implicates store forwarding, the issue being here
where there are narrow stores and then a wide load.
We likely need smarter struct copy logic to avoid creating this sort of thing. Might be a simple within-block tracking of how we last accessed a struct would be sufficient? Eg if we "just" wrote to a field then copying field-wise is possibly better for perf.
JulieLeeMSFT commentedon Dec 4, 2025
cc @jakobbotsch.
JIT: avoid store forward stall for struct params in GS frames (#127487)
AndyAyersMS commentedon May 8, 2026
Fixed by #127487