[llvm] Added Conditions of SM90 and ISA7.8 for Using cvt.ftz.f32.bf16 Instruction (PR #165774)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 30 13:36:25 PDT 2025


================
@@ -2268,7 +2268,7 @@ def : Pat<(f32 (fpround f64:$a)), (CVT_f32_f64 $a, CvtRN)>;
 def : Pat<(f32 (fpextend f16:$a)), (CVT_f32_f16 $a, CvtNONE_FTZ)>, Requires<[doF32FTZ]>;
 def : Pat<(f32 (fpextend f16:$a)), (CVT_f32_f16 $a, CvtNONE)>;
 // fpextend bf16 -> f32
-def : Pat<(f32 (fpextend bf16:$a)), (CVT_f32_bf16 $a, CvtNONE_FTZ)>, Requires<[doF32FTZ]>;
+def : Pat<(f32 (fpextend bf16:$a)), (CVT_f32_bf16 $a, CvtNONE_FTZ)>, Requires<[doF32FTZ,hasPTX<78>, hasSM<90>]>;
----------------
AlexMaclean wrote:

Nit, add a space after the commas. 

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


More information about the llvm-commits mailing list