llvm-project
c5def9b2 - [SelectionDAG] Convert soft-promoted f16 to wide integers without a libcall (#235259)

Commit
2 days ago
[SelectionDAG] Convert soft-promoted f16 to wide integers without a libcall (#235259) #230779 converts `f16` to the half-width integer type and extends it when the result of `fp_to_[su]int` must be expanded, but only when `f16` is legal. When `f16` is soft-promoted (e.g. RISC-V with F but without Zfh, ARM with VFP but without fullfp16), the conversion still calls `__fixsfti`, `__fixsfdi`, `__aeabi_f2lz` or their unsigned variants. Take the same path when `f16` is soft-promoted and `f32` is legal; the narrower conversion extends the operand to `f32`. The conversion keeps `f16` as its source type, so that the second expansion of `i128` on 32-bit targets also takes this path. Targets without `f32` keep the libcall. Assisted-by: Claude Opus 5.5
Author
Parents
Loading