[mlir] Use static shape knowledge when lowering memref.reshape
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 11 May 2021 12:14:54 +0000 (14:14 +0200)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 11 May 2021 16:21:09 +0000 (18:21 +0200)
commitb20e150c9be16f69c73f4cd2986053d13d0f376a
tree170e2c4e13b1d341cb108b296340ddcdcfcca4f9
parentec28e43e01540a57f8822b2efb8638996873f945
[mlir] Use static shape knowledge when lowering memref.reshape

This is actually necessary for correctness, as memref.reinterpret_cast
doesn't verify if the output shape doesn't match the static sizes.

Differential Revision: https://reviews.llvm.org/D102232
mlir/lib/Dialect/StandardOps/Transforms/ExpandOps.cpp
mlir/test/Dialect/Standard/expand-ops.mlir