[llvm] [NVPTX] Add support for f32x2 mixed-precision add/sub (PR #221957)

Srinivasa Ravi via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 22:47:41 PDT 2026


================
@@ -2495,8 +2495,37 @@ def INT_NVVM_ADD_D :
   F_MATH_2_RNDOP_TY<"add.${rnd}.f64", F64RT, int_nvvm_fadd>;
 
 // mixed precision
+
+// match only when the fold removes at least one explicit conversion, and the
+// extended vector is not shared.
+class FoldableFPExtendV2F32<dag ops, dag frag>
+  : PatFrag<ops, frag, [{
+      return N->hasOneUse() && (N->getOperand(0)->hasOneUse() ||
+                                N->getOperand(1)->hasOneUse());
+    }]>;
+
+// FP_EXTEND to v2f32 is scalarized before isel, leaving one of two shapes
----------------
Wolfram70 wrote:

Sure, changed it to `patterns` in the latest revision, Thanks!

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


More information about the llvm-commits mailing list