[mlir][linalg] Only apply masking on xfer_write when needed.
authorHanhan Wang <hanchung@google.com>
Thu, 25 May 2023 00:41:29 +0000 (17:41 -0700)
committerHanhan Wang <hanchung@google.com>
Thu, 25 May 2023 01:24:19 +0000 (18:24 -0700)
commit3669d07987a7fe142db6d911b64a356bd9b5a0a3
tree62257c6752dfd1976e5cd50849db1e832b1de181
parentd9b574c312c34ddc88dee7fdb7f55fe748839683
[mlir][linalg] Only apply masking on xfer_write when needed.

If the input vector sizes are as same as tensor.pad result shape, the
masking is not needed. Otherwise, the masking is needed and the masking
operands should be as same as tensor.empty op.

Reviewed By: dcaballe

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