[all-commits] [llvm/llvm-project] 8ceeba: [MLIR][SCF] Canonicalize redundant scf.if from scf...

Ming Yan via All-commits all-commits at lists.llvm.org
Mon Dec 1 02:54:42 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ceeba83812d551423a9e50f600cc77ea4718ca2
      https://github.com/llvm/llvm-project/commit/8ceeba83812d551423a9e50f600cc77ea4718ca2
  Author: Ming Yan <ming.yan at terapines.com>
  Date:   2025-12-01 (Mon, 01 Dec 2025)

  Changed paths:
    M mlir/lib/Dialect/SCF/IR/SCF.cpp
    M mlir/test/Dialect/SCF/canonicalize.mlir

  Log Message:
  -----------
  [MLIR][SCF] Canonicalize redundant scf.if from scf.while before region into after region (#169892)

When a `scf.if` directly precedes a `scf.condition` in the before region
of a `scf.while` and both share the same condition, move the if into the
after region of the loop. This helps simplify the control flow to enable
uplifting `scf.while` to `scf.for`.



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