[tensor][bufferize] Use affine.apply instead of arith.addi in PadOp lowering
authorMatthias Springer <springerm@google.com>
Tue, 23 Aug 2022 09:38:54 +0000 (11:38 +0200)
committerMatthias Springer <springerm@google.com>
Tue, 23 Aug 2022 09:46:11 +0000 (11:46 +0200)
commitc37ed7762e9f473e9497c52c7669a025965651f7
tree60622b1dc94e3dfd58c65f914484d5b338c3a8c1
parent4332b049edf6ccf98c9e31dcc983760a89f01d40
[tensor][bufferize] Use affine.apply instead of arith.addi in PadOp lowering

Affine exprs compose better than arith ops.

Differential Revision: https://reviews.llvm.org/D132456
mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp
mlir/lib/Dialect/Tensor/Transforms/CMakeLists.txt
mlir/test/Dialect/Tensor/bufferize.mlir
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel