[all-commits] [llvm/llvm-project] 3de11e: [mlir][CF] Add `ub.unreachable` canonicalization (...

Matthias Springer via All-commits all-commits at lists.llvm.org
Sat Nov 29 18:37:20 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3de11e9251bba9f974b99947662eea69329075b2
      https://github.com/llvm/llvm-project/commit/3de11e9251bba9f974b99947662eea69329075b2
  Author: Matthias Springer <me at m-sp.org>
  Date:   2025-11-30 (Sun, 30 Nov 2025)

  Changed paths:
    M mlir/lib/Dialect/ControlFlow/IR/CMakeLists.txt
    M mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
    M mlir/test/Dialect/ControlFlow/canonicalize.mlir

  Log Message:
  -----------
  [mlir][CF] Add `ub.unreachable` canonicalization (#169873)

Basic blocks with only a `ub.unreachable` terminator are unreachable.
This commit adds a canonicalization pattern that folds to `cf.cond_br`
to `cf.br` if one of the destination branches is unreachable.



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