[llvm] [NVVM] Move print functions from NVVMIntrinsicUtils.h to cpp file (PR #168997)

Dharuni R Acharya via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 21 00:08:22 PST 2025


================
@@ -662,50 +662,9 @@ inline APFloat::roundingMode GetFMARoundingMode(Intrinsic::ID IntrinsicID) {
   llvm_unreachable("Invalid FP instrinsic rounding mode for NVVM fma");
 }
 
-inline void printTcgen05MMAKind(raw_ostream &OS, const Constant *ImmArgVal) {
-  if (const auto *CI = dyn_cast<ConstantInt>(ImmArgVal)) {
-    uint64_t Val = CI->getZExtValue();
-    switch (static_cast<Tcgen05MMAKind>(Val)) {
-    case Tcgen05MMAKind::F16:
-      OS << "f16";
-      return;
-    case Tcgen05MMAKind::TF32:
-      OS << "tf32";
-      return;
-    case Tcgen05MMAKind::F8F6F4:
-      OS << "f8f6f4";
-      return;
-    case Tcgen05MMAKind::I8:
-      OS << "i8";
-      return;
-    }
-  }
-  llvm_unreachable(
-      "printTcgen05MMAKind called with invalid value for immediate argument");
-}
+void printTcgen05MMAKind(raw_ostream &OS, const Constant *ImmArgVal);
 
-inline void printTcgen05CollectorUsageOp(raw_ostream &OS,
-                                         const Constant *ImmArgVal) {
-  if (const auto *CI = dyn_cast<ConstantInt>(ImmArgVal)) {
-    uint64_t Val = CI->getZExtValue();
-    switch (static_cast<Tcgen05CollectorUsageOp>(Val)) {
-    case Tcgen05CollectorUsageOp::DISCARD:
-      OS << "discard";
-      return;
-    case Tcgen05CollectorUsageOp::LASTUSE:
-      OS << "lastuse";
-      return;
-    case Tcgen05CollectorUsageOp::FILL:
-      OS << "fill";
-      return;
-    case Tcgen05CollectorUsageOp::USE:
-      OS << "use";
-      return;
-    }
-  }
-  llvm_unreachable("printTcgen05CollectorUsageOp called with invalid value for "
-                   "immediate argument");
-}
+void printTcgen05CollectorUsageOp(raw_ostream &OS, const Constant *ImmArgVal);
----------------
DharuniRAcharya wrote:

Updated in the latest revision!

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


More information about the llvm-commits mailing list