[Mlir-commits] [mlir] [mlir][arith] Add rounding mode flags to binary arithmetic operations (PR #188458)
Mehdi Amini
llvmlistbot at llvm.org
Wed Apr 8 13:19:05 PDT 2026
================
@@ -957,14 +988,17 @@ def Arith_NegFOp : Arith_FloatUnaryOp<"negf"> {
// AddFOp
//===----------------------------------------------------------------------===//
-def Arith_AddFOp : Arith_FloatBinaryOp<"addf", [Commutative]> {
+def Arith_AddFOp : Arith_FloatBinaryOpWithRoundingMode<"addf", [Commutative]> {
let summary = "floating point addition operation";
let description = [{
The `addf` operation takes two operands and returns one result, each of
these is required to be the same type. This type may be a floating point
scalar type, a vector whose element type is a floating point type, or a
floating point tensor.
+ If the value cannot be exactly represented, it is rounded using the
+ provided rounding mode or the default one if no rounding mode is provided.
----------------
joker-eph wrote:
Right: we need the arith dialect documentation to be self contained basically. We may refer to LLVM in some way, but we can't assume it in "the one environment" where arith operates right now.
https://github.com/llvm/llvm-project/pull/188458
More information about the Mlir-commits
mailing list