[Mlir-commits] [mlir] [mlir] [vector] Add linearization pattern for vector.create_mask (PR #138214)

James Newling llvmlistbot at llvm.org
Mon May 12 13:28:23 PDT 2025


================
@@ -445,6 +445,64 @@ struct LinearizeVectorSplat final
   }
 };
 
+/// This pattern converts the CreateMaskOp to work on a
+/// linearized vector. The pattern currently
+/// supports only 2D masks with a unit outer dimension.
----------------
newling wrote:

I'm ok to have this postponed to a future PR, but supporting this might save someone time debugging in the future. It might not be clear why
```
%0 = vector.create_mask %arg0, %arg1 : vector<1x16xi1>
```
is supported/linearized but  
```
%1 = vector.create_mask %arg0, %arg1 : vector<16x1xi1>
%2 = vector.create_mask %arg0, %arg1 : vector<1x1x16xi1>
```
aren't

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


More information about the Mlir-commits mailing list