[mlir][linalg] Fix `FoldTensorCastProducerOp` for generic with memref output
authorIvan Butygin <ivan.butygin@gmail.com>
Thu, 10 Nov 2022 19:53:36 +0000 (20:53 +0100)
committerIvan Butygin <ivan.butygin@gmail.com>
Wed, 16 Nov 2022 21:59:54 +0000 (22:59 +0100)
commit06e972ed91e6d173025dc122d202f546d1a5e8ce
tree466166a90b6f987512da3fcf33954a55ebacb45e
parentadf795dc7ce7d96220f2fc327286cd41bdaefe25
[mlir][linalg] Fix `FoldTensorCastProducerOp` for generic with memref output

Type should only be added to results if it is tensor.

Differential Revision: https://reviews.llvm.org/D137801
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
mlir/test/Dialect/Linalg/canonicalize.mlir