[mlir][Interfaces] Fix DestinationStyleOpInterface for vector ops
authorMatthias Springer <me@m-sp.org>
Mon, 17 Jul 2023 15:10:33 +0000 (17:10 +0200)
committerMatthias Springer <me@m-sp.org>
Mon, 17 Jul 2023 15:40:18 +0000 (17:40 +0200)
commit0e8c68c30102e91b992996c4f45e5bc03280923a
tree8ba00c08f841bb46bdf5016bf5ad2b26bcc2ddb0
parentd71329773d9ac0ba8cf570dc0d5ad89ce20a00c2
[mlir][Interfaces] Fix DestinationStyleOpInterface for vector ops

This revision fixes `hasTensorSemantics` and `hasBufferSemantics` for vector transfer ops, which may have a vector operand. `VectorType` implements `ShapedType` and such operands do not affect whether an op has tensor or buffer semantics. Also implement `DestinationStyleOpInterface` on `TransferReadOp` so that `hasTensorSemantics`/`hasBufferSemantics` can be called. (The op has no inits, but this makes it symmetric to `TransferWriteOp`.)

Differential Revision: https://reviews.llvm.org/D155469
mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
mlir/include/mlir/Interfaces/DestinationStyleOpInterface.td