JIT: Use unsigned native return types for small structs#86631
JIT: Use unsigned native return types for small structs#86631jakobbotsch merged 1 commit intodotnet:mainfrom
Conversation
Prefer the return type to be unsigned when small structs are returned in registers. This causes the backend to use zero extension instead of sign extension in a few cases, which has a smaller encoding on xarch.
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsPrefer the return type to be unsigned when small structs are returned in registers. This causes the backend to use zero extension instead of sign extension in a few cases, which has a smaller encoding on xarch. Fixes a few small regressions I saw in #86388.
|
|
cc @dotnet/jit-contrib PTAL @EgorBo. Small number of (non-test) improvement. Few regressions related to CSE/register allocation. |
EgorBo
left a comment
There was a problem hiding this comment.
This is a correctness change, right? Since, I guess, sign extension is not expected when you have C# byte
No, we don't make any guarantees about normalization when structs are returned in registers, so there's no correctness issue with the existing codegen. |
Prefer the return type to be unsigned when small structs are returned in registers. This causes the backend to use zero extension instead of sign extension in a few cases, which has a smaller encoding on xarch.
Fixes a few small regressions I saw in #86388.
E.g.
Before:
After: