[Mlir-commits] [mlir] [mlir][arith][NFC] Minor Revisions to Comments (PR #158757)
Akhil Goel
llvmlistbot at llvm.org
Tue Sep 16 10:21:49 PDT 2025
https://github.com/akhilgoe updated https://github.com/llvm/llvm-project/pull/158757
>From be57899abf1f65bfb8a9876febfd9714cc920a13 Mon Sep 17 00:00:00 2001
From: Akhil Goel <akhil.goel at intel.com>
Date: Mon, 15 Sep 2025 16:53:31 -0700
Subject: [PATCH 1/2] Minor comment fixes
---
mlir/lib/Dialect/Arith/IR/ArithCanonicalization.td | 2 +-
mlir/lib/Dialect/Arith/IR/ArithOps.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mlir/lib/Dialect/Arith/IR/ArithCanonicalization.td b/mlir/lib/Dialect/Arith/IR/ArithCanonicalization.td
index 4558d827e8563..de3efc9fe3506 100644
--- a/mlir/lib/Dialect/Arith/IR/ArithCanonicalization.td
+++ b/mlir/lib/Dialect/Arith/IR/ArithCanonicalization.td
@@ -394,7 +394,7 @@ def TruncIShrSIToTrunciShrUI :
[(TruncationMatchesShiftAmount $x, $tr, $c0)]>;
//===----------------------------------------------------------------------===//
-// TruncIOp
+// TruncFOp
//===----------------------------------------------------------------------===//
// truncf(sitofp(x)) -> sitofp(x) if default rounding mode.
diff --git a/mlir/lib/Dialect/Arith/IR/ArithOps.cpp b/mlir/lib/Dialect/Arith/IR/ArithOps.cpp
index 7d4d818ee448b..503507a4ecfed 100644
--- a/mlir/lib/Dialect/Arith/IR/ArithOps.cpp
+++ b/mlir/lib/Dialect/Arith/IR/ArithOps.cpp
@@ -2723,7 +2723,7 @@ TypedAttr mlir::arith::getIdentityValueAttr(AtomicRMWKind kind, Type resultType,
return nullptr;
}
-/// Return the identity numeric value associated to the give op.
+/// Return the identity numeric value associated to the given op.
std::optional<TypedAttr> mlir::arith::getNeutralElement(Operation *op) {
std::optional<AtomicRMWKind> maybeKind =
llvm::TypeSwitch<Operation *, std::optional<AtomicRMWKind>>(op)
>From 43e620dc333c4ef10bc56ee6cca6d2fc928a6cb0 Mon Sep 17 00:00:00 2001
From: Akhil Goel <akhil.goel at intel.com>
Date: Tue, 16 Sep 2025 10:21:39 -0700
Subject: [PATCH 2/2] Update comment
---
mlir/lib/Dialect/Arith/IR/ArithOps.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mlir/lib/Dialect/Arith/IR/ArithOps.cpp b/mlir/lib/Dialect/Arith/IR/ArithOps.cpp
index 503507a4ecfed..1fbb7a4784cd5 100644
--- a/mlir/lib/Dialect/Arith/IR/ArithOps.cpp
+++ b/mlir/lib/Dialect/Arith/IR/ArithOps.cpp
@@ -2723,7 +2723,7 @@ TypedAttr mlir::arith::getIdentityValueAttr(AtomicRMWKind kind, Type resultType,
return nullptr;
}
-/// Return the identity numeric value associated to the given op.
+/// Returns the identity numeric value of the given op.
std::optional<TypedAttr> mlir::arith::getNeutralElement(Operation *op) {
std::optional<AtomicRMWKind> maybeKind =
llvm::TypeSwitch<Operation *, std::optional<AtomicRMWKind>>(op)
More information about the Mlir-commits
mailing list