[mlir][linalg] Set explicit insertion point in pad_tensor patterns.
authorTobias Gysi <gysit@google.com>
Mon, 19 Jul 2021 08:16:28 +0000 (08:16 +0000)
committerTobias Gysi <gysit@google.com>
Mon, 19 Jul 2021 08:43:56 +0000 (08:43 +0000)
commit3f8f29233067faef6b2c22a6b654abf7e638f2be
tree14bd0c0df02f138378381d203513acc257ce0e2a
parent73e4b5cfa8ea6dda3624e03beb60827db12bb3a3
[mlir][linalg] Set explicit insertion point in pad_tensor patterns.

Insert ops replacing pad_tensor in front of the associated tansfer_write / insert_slice op. Otherwise we may end up with invalid ir if one of the remaining tansfer_write / insert_slice operands is defined after the pad_tensor op.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D106162
mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
mlir/test/Dialect/Linalg/vectorization.mlir