[Mlir-commits] [mlir] [mlir][vector] NFC: Rename helper to check for all ones mask for constency (PR #71810)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Nov 9 06:22:22 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Quinn Dawkins (qedawkins)

<details>
<summary>Changes</summary>

Following up on https://github.com/llvm/llvm-project/pull/71676#discussion_r1387561079

---
Full diff: https://github.com/llvm/llvm-project/pull/71810.diff


2 Files Affected:

- (modified) mlir/include/mlir/Dialect/Vector/IR/VectorOps.td (+1-1) 
- (modified) mlir/lib/Dialect/Vector/IR/VectorOps.cpp (+2-2) 


``````````diff
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) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/71810


More information about the Mlir-commits mailing list