[clang] [llvm] [NVPTX] Add builtins and intrinsics for conversions of new FP types (PR #134345)
Srinivasa Ravi via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 9 00:12:49 PDT 2025
================
@@ -1944,6 +1944,62 @@ def : Pat<(int_nvvm_e5m2x2_to_f16x2_rn Int16Regs:$a),
def : Pat<(int_nvvm_e5m2x2_to_f16x2_rn_relu Int16Regs:$a),
(CVT_f16x2_e5m2x2 $a, CvtRN_RELU)>;
+def : Pat<(int_nvvm_ff_to_e2m3x2_rn f32:$a, f32:$b),
+ (CVT_e2m3x2_f32 $a, $b, CvtRN)>,
+ Requires<[hasPTX<86>, hasSM<100>, hasArchAccelFeatures]>;
+def : Pat<(int_nvvm_ff_to_e2m3x2_rn_relu f32:$a, f32:$b),
+ (CVT_e2m3x2_f32 $a, $b, CvtRN_RELU)>,
+ Requires<[hasPTX<86>, hasSM<100>, hasArchAccelFeatures]>;
+def : Pat<(int_nvvm_ff_to_e3m2x2_rn f32:$a, f32:$b),
+ (CVT_e3m2x2_f32 $a, $b, CvtRN)>,
+ Requires<[hasPTX<86>, hasSM<100>, hasArchAccelFeatures]>;
+def : Pat<(int_nvvm_ff_to_e3m2x2_rn_relu f32:$a, f32:$b),
+ (CVT_e3m2x2_f32 $a, $b, CvtRN_RELU)>,
+ Requires<[hasPTX<86>, hasSM<100>, hasArchAccelFeatures]>;
+
+def : Pat<(int_nvvm_e2m3x2_to_f16x2_rn Int16Regs:$a),
----------------
Wolfram70 wrote:
Changed the input pattern to `i16` in the latest revision, thanks!
https://github.com/llvm/llvm-project/pull/134345
More information about the cfe-commits
mailing list