llvm-project
61d8e5ca - [MLIR][Vector] Fix crash in operatesOnSuperVectorsOf on rank-mismatched shaped (#183967)

Commit
47 days ago
[MLIR][Vector] Fix crash in operatesOnSuperVectorsOf on rank-mismatched shaped (#183967) The `operatesOnSuperVectorsOf` function in VectorUtils.cpp contained an assertion that fired when a `vector.transfer` operation's vector type had a different rank (or non-divisible shape) from the sub-vector type supplied by the caller: assert((ratio || \!mustDivide) && "vector.transfer operation in which super-vector size is not an" " integer multiple of sub-vector size"); This assertion was incorrect because the function's callers (e.g., the affine super-vectorizer) legitimately pass transfer ops whose vector type doesn't match the requested sub-vector shape. In those cases the correct answer is simply that the op does not operate on a super-vector of that sub-vector type, so `operatesOnSuperVectorsOf` should return `false`. Remove the assert return `false` when `computeShapeRatio` produces no result, and remove the now-unused `mustDivide` variable. Fixes #149327 Fixes #131096
Author
Parents
Loading