[clang] [llvm] [clang][NVPTX] Add builtins and intrinsics for conversions of new FP types (PR #134345)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 11 11:01:26 PDT 2025


================
@@ -703,6 +703,41 @@ let hasSideEffects = false in {
   defm CVT_to_tf32_rz_satf : CVT_TO_TF32<"rz.satfinite", [hasPTX<86>, hasSM<100>]>;
   defm CVT_to_tf32_rn_relu_satf  : CVT_TO_TF32<"rn.relu.satfinite", [hasPTX<86>, hasSM<100>]>;
   defm CVT_to_tf32_rz_relu_satf  : CVT_TO_TF32<"rz.relu.satfinite", [hasPTX<86>, hasSM<100>]>;
+
+  // FP6 conversions.
+  foreach type = ["e2m3x2", "e3m2x2"] in {
+    def CVT_ # type # _f32 : NVPTXInst<(outs Int16Regs:$dst),
----------------
Artem-B wrote:

Perhaps it would make sense to add `_sf` to the suffix to reflect that we'll be generating `.satfinite` instruction, so the naming scheme is consistent with other types that generate both satfinite and non-satfinite variants.

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


More information about the llvm-commits mailing list