[mlir][Vector] Fold InsertStridedSliceOp of two splat with the same input to splat.
authorjacquesguan <Jianjian.Guan@streamcomputing.com>
Thu, 30 Jun 2022 08:30:59 +0000 (16:30 +0800)
committerjacquesguan <Jianjian.Guan@streamcomputing.com>
Fri, 1 Jul 2022 02:46:47 +0000 (10:46 +0800)
commit91ab4d4231e5b7456d012776c5eeb69fa61ab994
tree3f9042d47fc18f621d2f7b1bffd88d277f5cd35a
parent2ceb9c347f14e81a8c71d644724cefd10fce6eaf
[mlir][Vector] Fold InsertStridedSliceOp of two splat with the same input to splat.

This patch folds InsertStridedSliceOp(SplatOp(X):src_type, SplatOp(X):dst_type) to SplatOp(X):dst_type.

Reviewed By: Mogball

Differential Revision: https://reviews.llvm.org/D128891
mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
mlir/lib/Dialect/Vector/IR/VectorOps.cpp
mlir/test/Dialect/Vector/canonicalize.mlir