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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Nov 10 06:32:10 PST 2023


Author: Quinn Dawkins
Date: 2023-11-10T09:32:06-05:00
New Revision: 28ace78d0b838acfd406bc9b5f521fae3e206491

URL: https://github.com/llvm/llvm-project/commit/28ace78d0b838acfd406bc9b5f521fae3e206491
DIFF: https://github.com/llvm/llvm-project/commit/28ace78d0b838acfd406bc9b5f521fae3e206491.diff

LOG: [mlir][vector] NFC: Rename helper to check for all ones mask for consistency (#71810)

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

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
    mlir/lib/Dialect/Vector/IR/VectorOps.cpp

Removed: 
    


################################################################################
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