This patch fixes codegen for [su]itofp instructions.
In LoongArch, a legal int-to-float conversion is done in two steps:
- Move the data from GPR to FPR. (FRLen >= GRLen)
- Conversion in FPR. (the data in FPR is treated as a signed value)
Based on the above features, when the type's BitWidth meets the
requirements, all SINT_TO_FP are legal, all UINT_TO_FP are expand
and lowered to libcall when appropriate.
The only special case is, LoongArch64 with +f,-d features. At this
point, custom processing is required for [SU]INT_TO_FP. Of course, we
can also ignore it and use libcall directly.
sexti32 for uint? (I might be sleepy so this might not be wrong after all.) The codegen in the touched test cases look good though, this is a bit weird.