[mlir][linalg] Improve codegen of ExtractSliceOfPadTensorSwapPattern
authorMatthias Springer <springerm@google.com>
Thu, 15 Jul 2021 02:05:12 +0000 (11:05 +0900)
committerMatthias Springer <springerm@google.com>
Thu, 15 Jul 2021 02:05:55 +0000 (11:05 +0900)
commit318ce4ad927d129a2bf96c2c872f4d107c45bdef
tree4315de8b23d7f1d5c9a1c081e37e470e4123505a
parentffb139290d4bf8e46ae88758354bccb647a20f71
[mlir][linalg] Improve codegen of ExtractSliceOfPadTensorSwapPattern

Generate simpler code in case low/high padding of the PadTensorOp is statically zero.

Differential Revision: https://reviews.llvm.org/D105529
mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
mlir/test/Dialect/Linalg/subtensor-of-padtensor.mlir