[Mlir-commits] [mlir] [MLIR] Minor fixes to FoldTransposeBroadcast rewrite (NFC) (PR #140083)
James Newling
llvmlistbot at llvm.org
Thu May 15 09:05:45 PDT 2025
newling wrote:
Thanks @momchil-velikov I think you are correct. What I don't understand is why there was no verification error. For example in https://github.com/llvm/llvm-project/blob/540cf25a6df56fa1810a7411477dca9896aeed20/mlir/test/Dialect/Vector/canonicalize/vector-transpose.mlir#L25
It was converting
```
%bcast = vector.broadcast %value : f32 to vector<8x1xf32>
%t = vector.transpose %bcast, [1, 0] : vector<8x1xf32> to vector<1x8xf32>
```
to
```
%bcast = vector.broadcast %value : f32 to vector<8x1xf32>
%t = vector.broadcast %bcast : vector<8x1xf32> to vector<1x8xf32>
```
but that `%t` is invalid. Unless the folder runs before verification? But yeah, it should have going directly to
```
%t = vector.broadcast %value : f32 to vector<1x8xf32>
```
https://github.com/llvm/llvm-project/pull/140083
More information about the Mlir-commits
mailing list