[mlir][MemRef] Make sure types match when folding dim(reshape)
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 15 Jun 2021 10:32:16 +0000 (12:32 +0200)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 15 Jun 2021 10:33:44 +0000 (12:33 +0200)
commitcd939351467643a80490d036408b1036d39b9814
tree7cf6368208c060a95428ce9bd6061a9dfe9f27d6
parent662e074d9043949eea4e360e47bf9e39959694b8
[mlir][MemRef] Make sure types match when folding dim(reshape)

Reshape can take integer types in addition to index, but dim always
returns index.

Differential Revision: https://reviews.llvm.org/D104287
mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
mlir/test/Dialect/Standard/canonicalize.mlir