[clang] [llvm] [NVPTX] Cleanup and document nvvm.fabs intrinsics, adding f16 support (PR #135644)

Alex MacLean via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 15 08:57:13 PDT 2025


================
@@ -1034,6 +1034,10 @@ Value *CodeGenFunction::EmitNVPTXBuiltinExpr(unsigned BuiltinID,
   case NVPTX::BI__nvvm_fmin_xorsign_abs_f16x2:
     return MakeHalfType(Intrinsic::nvvm_fmin_xorsign_abs_f16x2, BuiltinID, E,
                         *this);
+  case NVPTX::BI__nvvm_abs_bf16:
+  case NVPTX::BI__nvvm_abs_bf16x2:
+    return Builder.CreateUnaryIntrinsic(Intrinsic::nvvm_fabs,
----------------
AlexMaclean wrote:

@Artem-B In the most recent iteration I update the clang frontend, which is certainly not my area of expertise. Please let me know if this looks okay, or if there are any changes required.

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


More information about the cfe-commits mailing list