[mlir] Insert tensor.cast only when needed when folding tensor.cast into extract_slice.
authorAlexander Belyaev <pifon@google.com>
Mon, 27 Feb 2023 14:16:27 +0000 (15:16 +0100)
committerAlexander Belyaev <pifon@google.com>
Mon, 27 Feb 2023 14:18:01 +0000 (15:18 +0100)
commit9fa61cbb2e8dbf00e9320145d38331b7da8d552f
tree1c36c34d7f5d2de836a2bb19e066250fa71796eb
parentc417b7a695704d5bc3be23f34d1bfa505f5172de
[mlir] Insert tensor.cast only when needed when folding tensor.cast into extract_slice.

Differential Revision: https://reviews.llvm.org/D144868
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp