[mono][jit] Fix float to int/uint casting behavior#86941
[mono][jit] Fix float to int/uint casting behavior#86941jandupej merged 4 commits intodotnet:mainfrom
Conversation
|
Does this need breaking change doc label? |
I'm not sure. AFAIK the overflow behavior of these casts is not standardized in .NET. The purpose of this change is to move the casting behavior closer to what CoreCLR does and to unify it with the SIMD case. |
|
@jkotas Do we need to document this as a breaking change? |
|
The overflow behavior of float to int/uint conversion has been documented as unspecified (see e.g. https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/numeric-conversions). I do not think that this needs breaking change notification. It is changing behavior on one specific runtime flavor to make it more similar to other runtime flavors. Both old and new behavior is valid according to the docs. |
|
Thanks for confirming. CI only shows known errors. Merging. |
Modifies
f32toi32andu32casting behavior on arm64 so that overflow cases saturate. 16-bit and 8-bit integers retain previous casting model. Addresses #85316. Enables SIMD f->i casting tests.