[Mlir-commits] [mlir] [mlir][scf] Declare ControlFlow as a dependent dialect (PR #216852)

Alessandro Potenza llvmlistbot at llvm.org
Mon Aug 31 01:43:12 PDT 2026


alepot55 wrote:

Thanks, that settles the design question. This PR does exactly that and nothing else: three lines in `SCFOps.td` adding `cf::ControlFlowDialect` to `dependentDialects`.

@joker-eph, that leaves only your question about the test file. I went through every test in `mlir/test/Dialect/SCF/` looking for a home:

- `canonicalize.mlir` runs `func.func(canonicalize{test-convergence})`, so with the repro's `llvm.func` parent the pass never visits the op. Changing the parent to `func.func` masks the bug, because Func's inliner extension loads ControlFlow for its own reasons, which is also why nothing in tree caught this.
- `for-loop-peeling.mlir` is the only other file that canonicalizes at module level, but only after `-scf-for-loop-peeling`, so the case would drag an unrelated pass along with it.
- `one-shot-bufferize.mlir` and `transform-loop-fuse-sibling.mlir` likewise run it behind another pass.

So the case needs its own RUN line, which is why it is a separate file rather than a new file for its own sake. Happy to rename it if the name is what bothers you.

`buildkite/libcxx-ci` is green on `4f4b21e43` and `mergeable_state` is `clean`, so this only needs an approval now.


https://github.com/llvm/llvm-project/pull/216852


More information about the Mlir-commits mailing list