[Mlir-commits] [mlir] [mlir][vector] Fix mask rank extension for TransferWriteNonPermutationLowering (PR #229852)

Andrzej Warzyński llvmlistbot at llvm.org
Mon Oct 19 11:50:13 PDT 2026


banach-space wrote:

Thanks! IMO, it would be good look into this a bit closer. Basically, this code is quite confusing: https://github.com/llvm/llvm-project/blob/d48c176a87ce7366d3e00f35b97d906a411ef571/mlir/lib/Dialect/Vector/Transforms/LowerVectorTransfer.cpp?plain=1#L33-L63

Specifically:
```cpp
 /// Extend the rank of a vector Value by `addedRanks` by adding outer unit 
 /// dimensions. 
 static Value extendVectorRank(
```
and
```cpp
 /// Extend the rank of a vector Value by `addedRanks` by adding inner unit 
 /// dimensions. 
 static Value extendMaskRank
```

The names and comments don't match. One hook implies "adding outer", the other implies "adding inner".  We really need to tidy this up before we proceed 😅 One hook for both the source vector and the mask should be sufficient.

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


More information about the Mlir-commits mailing list