[Mlir-commits] [mlir] [mlir][vector] NFC: Rename helper to check for all ones mask for constency (PR #71810)
Quinn Dawkins
llvmlistbot at llvm.org
Thu Nov 9 06:21:50 PST 2023
https://github.com/qedawkins created https://github.com/llvm/llvm-project/pull/71810
Following up on https://github.com/llvm/llvm-project/pull/71676#discussion_r1387561079
>From 4975d1820178391d8589d1fa2fcd3a416cd2f99a Mon Sep 17 00:00:00 2001
From: Quinn Dawkins <quinn at nod-labs.com>
Date: Thu, 9 Nov 2023 09:15:18 -0500
Subject: [PATCH] [mlir][vector] NFC: Rename helper to check for all ones mask
for consistency
---
mlir/include/mlir/Dialect/Vector/IR/VectorOps.td | 2 +-
mlir/lib/Dialect/Vector/IR/VectorOps.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
index 3a6d81b59aeb1f9..02e80a6446dfb24 100644
--- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
@@ -2283,7 +2283,7 @@ def Vector_ConstantMaskOp :
}
/// Return whether the mask is a uniform vector of `1`s.
- bool isFullMask();
+ bool isAllOnesMask();
}];
let assemblyFormat = "$mask_dim_sizes attr-dict `:` type(results)";
diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index 9a2b71e459f56af..9cbfd3dba561914 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -3947,7 +3947,7 @@ static LogicalResult foldTransferFullMask(TransferOp op) {
if (!constantMask)
return failure();
- if (!constantMask.isFullMask())
+ if (!constantMask.isAllOnesMask())
return failure();
op.getMaskMutable().clear();
@@ -5622,7 +5622,7 @@ LogicalResult ConstantMaskOp::verify() {
return success();
}
-bool ConstantMaskOp::isFullMask() {
+bool ConstantMaskOp::isAllOnesMask() {
auto resultType = getVectorType();
// Check the corner case of 0-D vectors first.
if (resultType.getRank() == 0) {
More information about the Mlir-commits
mailing list