[Mlir-commits] [mlir] Fix the description of the semantics of math.clampf (PR #175012)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Jan 8 08:21:14 PST 2026


https://github.com/jack-slingsby updated https://github.com/llvm/llvm-project/pull/175012

>From d68252258c0b8a6dc93bfd1c4c1bc2254730d6db Mon Sep 17 00:00:00 2001
From: Jack Slingsby <jack.slingsby at imgtec.com>
Date: Thu, 8 Jan 2026 16:02:40 +0000
Subject: [PATCH] Fix the description of the semantics of math.clampf

---
 mlir/include/mlir/Dialect/Math/IR/MathOps.td | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/include/mlir/Dialect/Math/IR/MathOps.td b/mlir/include/mlir/Dialect/Math/IR/MathOps.td
index af65af6fedec6..432f08b14a989 100644
--- a/mlir/include/mlir/Dialect/Math/IR/MathOps.td
+++ b/mlir/include/mlir/Dialect/Math/IR/MathOps.td
@@ -365,7 +365,7 @@ def Math_ClampFOp : Math_FloatTernaryOp<"clampf"> {
 
     The semantics of the operation are described by:
     ```
-      clampf(value, min, max) = maxf(minf(value, min), max)
+      clampf(value, min, max) = minf(maxf(value, min), max)
     ```
 
     Example:



More information about the Mlir-commits mailing list