[mlir][spirv] Legalize subviewop when used with vector transfer
authorThomas Raoux <thomasraoux@google.com>
Sat, 20 Jun 2020 00:33:15 +0000 (17:33 -0700)
committerThomas Raoux <thomasraoux@google.com>
Sat, 20 Jun 2020 00:33:15 +0000 (17:33 -0700)
commit670455c77d4b2ee3bcf90fb454f62ae69ec47239
tree94095d0b38eadaf4d5d351883aa8f56f89da5648
parente4bc08f0121e4bf152592679a64af14c7cbfdba7
[mlir][spirv] Legalize subviewop when used with vector transfer

Subview operations are not natively supported downstream in the spirv path.
This change allows removing subview when used by vector transfer the same way
we already do it when they are used by LoadOp/StoreOp

Differential Revision: https://reviews.llvm.org/D82106
mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
mlir/test/Conversion/StandardToSPIRV/legalization.mlir