[all-commits] [llvm/llvm-project] c044b8: [mlir][affine] Fix crash in super-vectorize when i...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Fri Mar 6 03:03:52 PST 2026


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

  Changed paths:
    M mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
    A mlir/test/Dialect/Affine/SuperVectorize/vectorize_inner_loop_dep_bounds.mlir

  Log Message:
  -----------
  [mlir][affine] Fix crash in super-vectorize when inner loop bounds depend on outer IV (#184770)

When affine-super-vectorize creates the vectorized version of an inner
loop whose bounds reference the outer loop's induction variable, it was
passing the original scalar bound operands directly to the new vector
AffineForOp. These operands reference block arguments of the scalar
outer loop, which are destroyed when the scalar loop nest is erased,
triggering a use_empty() assertion.

Fix this by replacing the bound operands with their scalar value
replacements (via getScalarValueReplacementsFor) before creating the new
vector loop, ensuring the vector inner loop uses the vector outer loop's
induction variable.

Fixes #121321



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