[llvm] [AArch64][GlobalISel] Fix lowering of i64->f32 itofp. (PR #132703)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 9 10:08:34 PDT 2025
================
@@ -7609,6 +7609,22 @@ LegalizerHelper::lowerU64ToF64BitFloatOps(MachineInstr &MI) {
return Legalized;
}
+/// i64->fp16 itofp can be lowered to i64->f64,f64->f32,f32->f16. We cannot
+/// convert fpround f64->f16 without double-rounding, so we manually perform the
+/// lowering here where we know it is valid.
+static LegalizerHelper::LegalizeResult
+loweri64tof16ITOFP(MachineInstr &MI, Register Dst, LLT DstTy, Register Src,
----------------
davemgreen wrote:
If the answer is "Check that the G_FPTRUNC is not legal in widenScalar for G_UITOFP" then I can give that a go, we just don't call other legalization actions in most of LegalizerHelper at the moment. The vector types will need to split even if the vector types are not legal (wider vectors etc).
https://github.com/llvm/llvm-project/pull/132703
More information about the llvm-commits
mailing list