[llvm] [MIPS] Updated MIPS N calling conventions so that fp16 arguments no longer cause a crash (PR #116569)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 22:48:07 PST 2024
yingopq wrote:
> So, the current implementation does the following:
>
> * Convert `i8`/`i16`/`i32` to `i64` only if they were not originally floats
> * Handle any remaining `i32`, only on soft-float, in a special way (these `i32`s are actually floats in the original signature)
>
> But after the change, `f16` were turned into `i16`, so they cannot handled by the first case because the `i16` was originally a float, but also they cannot be handled by the second case because they aren't `i32`s, causing the crash.
>
> What I did was relax the conditions, so that `i16` that were originally float could still be handled by the first case, and the simplest and clearest way was to flip the order and make the second case more specific.
>
> So now the logic is as follows:
>
> * Handle any `i32`, on soft-float only and if they were originally float (this should now cover the second case)
> * Convert `i8`/`i16`/`i32` to `i64` (any `i32` that needed to be handled in a special case would have been processed already)
>
> In order to not flip the order of these two operations we would need to make the first condition more complicated than "they were not originally floats".
Thank you for your detailed reply, I got it.
LGTM.
https://github.com/llvm/llvm-project/pull/116569
More information about the llvm-commits
mailing list