[llvm] [AArch64][SDAG] Add f16 -> i16 rounding NEON conversion intrinsics (PR #155851)

David Green via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 29 06:04:16 PDT 2025


================
@@ -28292,6 +28306,30 @@ void AArch64TargetLowering::ReplaceNodeResults(
       Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, VT, V));
       return;
     }
+    case Intrinsic::aarch64_neon_fcvtzs: {
----------------
davemgreen wrote:

If it is done as a combine it might help constant fold or optimize the instruction. It's unlikely, but it might come up from time to time. If it was done in lowering then yeah, there is less point in going via fptosi.sat.

If they are equivalent then we could think of just emitting the saturating convert in clang and avoid the neon intrinsics entirely.

https://github.com/llvm/llvm-project/pull/155851


More information about the llvm-commits mailing list