[mlir][vector] Fix crash in extractelement vec distribution
authorThomas Raoux <thomasraoux@google.com>
Wed, 11 Jan 2023 01:42:59 +0000 (01:42 +0000)
committerThomas Raoux <thomasraoux@google.com>
Wed, 11 Jan 2023 02:35:12 +0000 (02:35 +0000)
commit069d7d7e4868dd7817b8b0c6858ac2334c1a4d89
tree4f3321d85fa92d10ae65c606f67be0a31efba4de
parentd0742ac2e531e3dc38ca22b200059cfaef85d838
[mlir][vector] Fix crash in extractelement vec distribution

Prevent creating a vector of size 0 that would fail verifier.
Vector 1d with a single element should be treated like 0d vectors.

Differential Revision: https://reviews.llvm.org/D141452
mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp
mlir/test/Dialect/Vector/vector-warp-distribute.mlir