[Mlir-commits] [mlir] [mlir][vector] Add verification for incorrect vector.extract (PR #115824)
Quinn Dawkins
llvmlistbot at llvm.org
Thu Nov 21 12:47:48 PST 2024
qedawkins wrote:
I'm not sure I follow that comment w.r.t. 0-d vectors. If this is just about disallowing cases where `extract` equates to a `bitcast`/`shape_cast`, then that implies making these cases illegal too:
```mlir
vector.extract %src_1[0]: vector<1xf32> from vector<1x1xf32>
vector.extract %src_2[0]: vector<8xf32> from vector<1x8xf32>
```
I feel that 0-d vectors are being singled out as though somehow being a non-canonical way to represent a single element vector is grounds for removal. I'd argue that `vector<1x...x1xf32>` is equally uncanonical in that case.
https://github.com/llvm/llvm-project/pull/115824
More information about the Mlir-commits
mailing list