[all-commits] [llvm/llvm-project] 61d8e5: [MLIR][Vector] Fix crash in operatesOnSuperVectors...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Wed Mar 4 16:48:25 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 61d8e5ca791f55753d5aebbd6175dc8c5d6b54ef
      https://github.com/llvm/llvm-project/commit/61d8e5ca791f55753d5aebbd6175dc8c5d6b54ef
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2026-03-05 (Thu, 05 Mar 2026)

  Changed paths:
    M mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp
    M mlir/test/Dialect/Affine/SuperVectorize/vector_utils.mlir

  Log Message:
  -----------
  [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



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list