[clang] [llvm] [NVPTX] Add builtins and intrinsics for conversions of new FP types (PR #134345)
Alex MacLean via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 10 18:42:59 PDT 2025
================
@@ -703,6 +703,46 @@ 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.
+ class CVT_f32_to_f6x2<string F6x2Name>
+ : NVPTXInst<(outs Int16Regs:$dst),
+ (ins Float32Regs:$src1, Float32Regs:$src2, CvtMode:$mode),
+ !strconcat("cvt${mode:base}.satfinite${mode:relu}.",
----------------
AlexMaclean wrote:
Nit: for simple cases like this, `#` is preferable over `!strconcat`
https://github.com/llvm/llvm-project/pull/134345
More information about the cfe-commits
mailing list