[Mlir-commits] [mlir] [mlir][vector] Fix patterns for dropping leading unit dims from masks (PR #73525)
Diego Caballero
llvmlistbot at llvm.org
Mon Nov 27 07:56:24 PST 2023
================
@@ -234,11 +251,9 @@ struct CastAwayTransferReadLeadingOneDim
Value mask = Value();
if (read.getMask()) {
- // The mask shape must always match the shape of the written vector, so we
- // can safely use the same extraction indices.
- int64_t dropDim = oldType.getRank() - newType.getRank();
- mask = rewriter.create<vector::ExtractOp>(read.getLoc(), read.getMask(),
- splatZero(dropDim));
+ VectorType maskType = read.getMaskType();
+ mask = processTransferMask(rewriter, read.getLoc(), read.getMask(),
----------------
dcaballe wrote:
nit: `processTransferMask` -> `dropUnitDimsFromMask` or something more descriptive?
https://github.com/llvm/llvm-project/pull/73525
More information about the Mlir-commits
mailing list