[all-commits] [llvm/llvm-project] 3cbae1: [mlir][sparse] Lower affine before SCF to CF in sp...

Kohei Yamaguchi via All-commits all-commits at lists.llvm.org
Tue Sep 15 09:50:06 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3cbae1632e6ca6f8436fcbc49d059cc924f883b0
      https://github.com/llvm/llvm-project/commit/3cbae1632e6ca6f8436fcbc49d059cc924f883b0
  Author: Kohei Yamaguchi <fix7211 at gmail.com>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
    A mlir/test/Dialect/SparseTensor/sparsifier_lower_affine.mlir

  Log Message:
  -----------
  [mlir][sparse] Lower affine before SCF to CF in sparsifier (#219860)

Fix the lowering order in the sparsifier pipeline by running
`convert-scf-to-cf` after `lower-affine`.

Previously, `convert-scf-to-cf` ran while Affine control-flow operations
could still be present. For example, lowering an `scf.if` nested inside
an `affine.for` introduces multiple blocks into the loop body, violating
`affine.for`'s single-block region requirement and causing verification
to fail.

Running `lower-affine` first converts Affine control flow to SCF. The
subsequent `convert-scf-to-cf` pass can then lower both the existing SCF
operations and those introduced by Affine lowering to CFG-based control
flow.

Fixes #217895



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