https://github.com/aokblast updated 
https://github.com/llvm/llvm-project/pull/226876

>From e3576a8fb9edd2c63f80c9fb39a4f326343fd0aa Mon Sep 17 00:00:00 2001
From: ShengYi Hung <[email protected]>
Date: Sun, 27 Sep 2026 22:33:07 -0500
Subject: [PATCH] [CIR] Support type deduction builder for
 BinaryFPToFPBuiltinOp

For external consumer, it would be easier to have constructor without
type parameter. As a result, we add a new builder, which can deduct type
from lhs directly.

As emitBinaryFPBuiltin is the only consumer for CIR Codegen, it is fine
for internal usage.
---
 clang/include/clang/CIR/Dialect/IR/CIROps.td | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/clang/include/clang/CIR/Dialect/IR/CIROps.td 
b/clang/include/clang/CIR/Dialect/IR/CIROps.td
index c1ba78eea2835..31e89407a5e64 100644
--- a/clang/include/clang/CIR/Dialect/IR/CIROps.td
+++ b/clang/include/clang/CIR/Dialect/IR/CIROps.td
@@ -7842,6 +7842,9 @@ class CIR_BinaryFPToFPBuiltinOp<string mnemonic, string 
llvmOpName>
     OpBuilder<(ins "mlir::Type":$result, "mlir::Value":$lhs,
                    "mlir::Value":$rhs), [{
       build($_builder, $_state, result, lhs, rhs, cir::FenvAttr{});
+    }]>,
+    OpBuilder<(ins "mlir::Value":$lhs, "mlir::Value":$rhs), [{
+      build($_builder, $_state, lhs, rhs, cir::FenvAttr{});
     }]>
   ];
 

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to