[all-commits] [llvm/llvm-project] b357d1: [RISCV] Lower f16 to i64 fp_to_[su]int via i32 on ...
Kane Wang via All-commits
all-commits at lists.llvm.org
Mon Sep 14 00:43:06 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b357d1a4a3573f202b8a1a1cb6ac56c18b7b6faf
https://github.com/llvm/llvm-project/commit/b357d1a4a3573f202b8a1a1cb6ac56c18b7b6faf
Author: Kane Wang <wangqiang1 at kylinos.cn>
Date: 2026-09-14 (Mon, 14 Sep 2026)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
M llvm/test/CodeGen/RISCV/half-convert-strict.ll
M llvm/test/CodeGen/RISCV/half-convert.ll
M llvm/test/CodeGen/RISCV/half-round-conv.ll
Log Message:
-----------
[RISCV] Lower f16 to i64 fp_to_[su]int via i32 on RV32 (#222829)
i64 is not a legal type on RV32, so f16 to i64 conversions used to be expanded to a __fixhfdi/__fixunshfdi libcall, which compiler-rt does not provide. f16 is the only FP type whose finite values always fit in an i32 after truncation towards zero, so custom expand them to an i32 conversion plus an extension instead; out of range values and NaN are poison, so the fcvt clamping is acceptable. With only Zfhmin/Zhinxmin the i32 conversion promotes f16 to f32, and both imply F/Zfinx so f32 is always legal. Other FP source types keep using the libcall.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list