[mlir][tensor/memref] Disallow Collapse/ExpandShapeOps that do not reduce/increase...
authorMatthias Springer <springerm@google.com>
Wed, 23 Nov 2022 08:19:00 +0000 (09:19 +0100)
committerMatthias Springer <springerm@google.com>
Wed, 23 Nov 2022 08:19:35 +0000 (09:19 +0100)
commitb9745ad81273a0d866873fdaee2843ca87e15f18
tree97dadc3a29ef83b13cc8996d9270545a28f5f38d
parent7a69a9d7aee2c5ccbf160b08356a0fc6acbebf75
[mlir][tensor/memref] Disallow Collapse/ExpandShapeOps that do not reduce/increase the rank

CollapseShapeOp/ExpandShapeOp that do not change the rank (or increase/reduce it) are invalid.

Differential Revision: https://reviews.llvm.org/D138498
mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
mlir/test/Dialect/MemRef/invalid.mlir
mlir/test/Dialect/Tensor/invalid.mlir