[Mlir-commits] [mlir] [mlir][affine] Fix crash when rolling back vectorization of reduction loops (PR #226912)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Sep 28 00:49:02 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Mattéo Rizza Murgier (matteo-rm)
<details>
<summary>Changes</summary>
Reductions introduce operations outside of the created loop, that are users of said loop. When rolling back (e.g. when an op inside the loop being vectorized is not vectorizable), only the created loop is deleted, which leads to the error: “operation destroyed but still has uses”.
This PR fixes this by recursively deleting users of the newly created loop before removing it when rolling back.
---
Full diff: https://github.com/llvm/llvm-project/pull/226912.diff
2 Files Affected:
- (modified) mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp (+15-3)
- (modified) mlir/test/Dialect/Affine/SuperVectorize/vectorize_reduction.mlir (+20)
``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````
</details>
https://github.com/llvm/llvm-project/pull/226912
More information about the Mlir-commits
mailing list