[mlir][linalg] Fold linalg.pad_tensor if src type == result type
authorMatthias Springer <springerm@google.com>
Tue, 15 Jun 2021 08:16:32 +0000 (17:16 +0900)
committerMatthias Springer <springerm@google.com>
Tue, 15 Jun 2021 08:25:12 +0000 (17:25 +0900)
commitb6ab4f1a8b6546b67dbcc3612f33c26d9b72a5cc
treec1c832c976aebe9e6fd74393878aad55e6c86cd2
parentf5dc511c538745df1ef4c5a22b99b56747f32edc
[mlir][linalg] Fold linalg.pad_tensor if src type == result type

Fold PadTensorOp to source if source type and result type have static shape and are equal.

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