[mlir] Add a TensorLoadToMemref canonicalization
A folder of `tensor_load + tensor_to_memref` exists but it only applies when source and destination memref types are the same. This revision adds a canonicalize `tensor_load + tensor_to_memref` to `memref_cast` when type mismatches prevent folding to kick in. Differential Revision: https://reviews.llvm.org/D97038
Loading
Please register or sign in to comment