[vector] When trimming leading insertion dimensions, base the final result on the...
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 18 Apr 2023 14:53:17 +0000 (16:53 +0200)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 18 Apr 2023 16:49:29 +0000 (18:49 +0200)
commit37a867a5a88871f937256d6cf1248eddabd8925e
treefb5d31d40f59d2db425553a92ea5536378b7b3d9
parent0905c567f0c7328780c727b470a92cda1ee54697
[vector] When trimming leading insertion dimensions, base the final result on the ranks

This was incorrect when the number of dropped source dims was smaller
than the number of dropped dst dims. We still need to insert zeros if
there is anything dropped from the src.

Differential Revision: https://reviews.llvm.org/D148636
mlir/lib/Dialect/Vector/Transforms/VectorDropLeadUnitDim.cpp
mlir/test/Dialect/Vector/vector-dropleadunitdim-transforms.mlir