[Mlir-commits] [mlir] [mlir][vector] Drop trailing 1-dims from constant_mask (PR #187383)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Fri Mar 20 01:48:49 PDT 2026
================
@@ -429,30 +429,40 @@ static VectorType trimNonScalableUnitDims(VectorType oldType) {
return VectorType::get(newShape, oldType.getElementType(), newScalableDims);
}
-// Rewrites vector.create_mask 'op' to drop non-scalable one dimensions.
-static FailureOr<Value>
-createMaskDropNonScalableUnitDims(PatternRewriter &rewriter, Location loc,
- vector::CreateMaskOp op) {
+static auto getMaskDimData(vector::CreateMaskOp op) { return op.getOperands(); }
+static auto getMaskDimData(vector::ConstantMaskOp op) {
+ return op.getMaskDimSizes();
+}
+
+static bool isUnitDimMask(Value operand) {
----------------
banach-space wrote:
For consistency:
```suggestion
static bool isUnitDimMask(Value maskDimSize) {
```
https://github.com/llvm/llvm-project/pull/187383
More information about the Mlir-commits
mailing list