[Mlir-commits] [mlir] e5f7116 - [mlir][vector] Limit vector.mask op to single vector result

Matthias Springer llvmlistbot at llvm.org
Wed Jan 18 06:59:52 PST 2023


Author: Matthias Springer
Date: 2023-01-18T15:55:13+01:00
New Revision: e5f711623ae7a6763da898fb9b582f9129083111

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

LOG: [mlir][vector] Limit vector.mask op to single vector result

Multiple vector results require multiple masks and passthru values.

Depends On: D141683

Differential Revision: https://reviews.llvm.org/D141786

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index 387f003e8c21..777133df07e3 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -5418,6 +5418,10 @@ LogicalResult MaskOp::verify() {
     return emitOpError(
         "expects result type to match maskable operation result type");
 
+  if (llvm::count_if(maskableOp->getResultTypes(),
+                     [](Type t) { return t.isa<VectorType>(); }) > 1)
+    return emitOpError("multiple vector results not supported");
+
   // Mask checks.
   Type expectedMaskType = maskableOp.getExpectedMaskType();
   if (getMask().getType() != expectedMaskType)


        


More information about the Mlir-commits mailing list