[Mlir-commits] [mlir] [MLIR][NVVM] Add LLVMIR lowering for nvvm.subf (PR #184968)

Durgadoss R llvmlistbot at llvm.org
Fri Mar 6 00:54:22 PST 2026


================
@@ -6366,6 +6370,14 @@ def NVVM_SubFOp : NVVM_FloatBinaryOp<"subf"> {
  
   }];
   let hasCanonicalizer = 1;
+  let hasVerifier = 1;
+
+  let llvmBuilder = [{
+    // sub(a, b) = add(a, -b)
+    llvm::Value *rhs = builder.CreateFNeg($rhs);
+    NVVM::AddFOp::lowerAddFToLLVMIR($lhs, rhs, op.getRes(), $rnd, $sat, $ftz, 
+                                    moduleTranslation, builder);
----------------
durga4github wrote:

Looks good to me, let us wait to hear from Guray!

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


More information about the Mlir-commits mailing list