q[mlir][Vector] Add a ShapeCastOp(BroadcastOp) canonicalization pattern
authorNicolas Vasilache <nicolas.vasilache@gmail.com>
Tue, 28 Jun 2022 15:29:46 +0000 (08:29 -0700)
committerNicolas Vasilache <nicolas.vasilache@gmail.com>
Tue, 28 Jun 2022 16:49:37 +0000 (09:49 -0700)
commita48bdee6866c79275bcf650a57c6c19fdf63991e
tree7821d677a416dd477fdb954b46f7037bbe573132
parent2b747241a6a0180c99dc4e46dbf62791080a9680
q[mlir][Vector] Add a ShapeCastOp(BroadcastOp) canonicalization pattern

This pattern can kick in when the source of the broadcast has a shape
that is a prefix/suffix of the result of the shape_cast.

Differential Revision: https://reviews.llvm.org/D128734
mlir/lib/Dialect/Vector/IR/VectorOps.cpp
mlir/test/Dialect/Vector/canonicalize.mlir