[clang] [llvm] [clang][NVPTX] Add support for mixed-precision FP arithmetic (PR #168359)

Srinivasa Ravi via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 26 19:53:10 PST 2025


================
@@ -1376,16 +1376,18 @@ let TargetPrefix = "nvvm" in {
     } // ftz
   } // variant
 
-  foreach rnd = ["rn", "rz", "rm", "rp"] in {
-    foreach ftz = ["", "_ftz"] in
-      def int_nvvm_fma_ # rnd # ftz # _f : NVVMBuiltin,
-        PureIntrinsic<[llvm_float_ty],
-          [llvm_float_ty, llvm_float_ty, llvm_float_ty]>;
-
-    def int_nvvm_fma_ # rnd # _d : NVVMBuiltin,
+  foreach rnd = ["_rn", "_rz", "_rm", "_rp"] in {
+    foreach ftz = ["", "_ftz"] in {
+      foreach sat = ["", "_sat"] in {
----------------
Wolfram70 wrote:

It looks like only `rn` rounding mode is supported for the half-precision instructions so only those variants with `rn` can be overloaded. So, I was thinking we could keep them as separate intrinsics for now.

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


More information about the llvm-commits mailing list