[mlir][vector] Add pattern to shuffle bitcast ops
authorLei Zhang <antiagainst@google.com>
Fri, 5 Feb 2021 22:48:09 +0000 (17:48 -0500)
committerLei Zhang <antiagainst@google.com>
Fri, 5 Feb 2021 22:52:49 +0000 (17:52 -0500)
commit7630520ae3c5af3f3536a81740cf316d3a21304e
tree20b49326bead1046d35d09ce353b4322d8c27be5
parenta4fa667dee6012e350bd405ee7a759a53738b279
[mlir][vector] Add pattern to shuffle bitcast ops

These patterns move vector.bitcast ops to be before
insert ops or after extract ops where suitable.
With them, bitcast will happen on smaller vectors
and there are more chances to share extract/insert
ops.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D96040
mlir/include/mlir/Dialect/Vector/VectorOps.h
mlir/lib/Dialect/Vector/VectorTransforms.cpp
mlir/test/Dialect/Vector/vector-transforms.mlir
mlir/test/lib/Transforms/TestVectorTransforms.cpp