[mlir][Vector] Fold transpose splat to splat with transposed type.
authorjacquesguan <Jianjian.Guan@streamcomputing.com>
Thu, 14 Apr 2022 08:32:02 +0000 (08:32 +0000)
committerjacquesguan <Jianjian.Guan@streamcomputing.com>
Mon, 18 Apr 2022 03:00:17 +0000 (03:00 +0000)
commit5479044bfcea20e77f57e6c29bc63c7e517d8b5a
treec1797fe010af2cf81e4258ef06ffce8dec66d0d5
parentc105bcbf98f343fc3687ccfa675378666434eef5
[mlir][Vector] Fold transpose splat to splat with transposed type.

This revision folds transpose splat to a new splat with the transposed vector type. For a splat, there is no need to actually do transpose for it, it would be more effective to just build a new splat as the result.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D123765
mlir/lib/Dialect/Vector/IR/VectorOps.cpp
mlir/test/Dialect/Vector/canonicalize.mlir
mlir/test/Dialect/Vector/vector-transfer-to-vector-load-store.mlir