[mlir][memref] Fix bug in verification of memref.collapse_shape
authorStephan Herhut <herhut@google.com>
Mon, 29 Nov 2021 13:39:51 +0000 (14:39 +0100)
committerStephan Herhut <herhut@google.com>
Mon, 29 Nov 2021 14:47:12 +0000 (15:47 +0100)
commit95f34e318c469806879a0cd1a6c5290901ed12df
treee41596291ea939c6d5e870b62c21f8fe92c20434
parentfc53eb69c26cdd7efa6b629c187d04326f0448ca
[mlir][memref] Fix bug in verification of memref.collapse_shape

The verifier computed an illegal type with negative dimension size when collapsing partially static memrefs.

Differential Revision: https://reviews.llvm.org/D114702
mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
mlir/test/Dialect/MemRef/ops.mlir