[Mlir-commits] [mlir] [MLIR] Introduce support for early exits (PR #166688)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Feb 20 07:04:03 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 3474 tests passed
* 415 tests skipped
* 2 tests failed

## Failed Tests
(click on a test name to see its output)

### MLIR
<details>
<summary>MLIR.Analysis/test-dominance.mlir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe C:\_work\llvm-project\llvm-project\mlir\test\Analysis\test-dominance.mlir -pass-pipeline="builtin.module(func.func(test-print-dominance))" -split-input-file | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\mlir\test\Analysis\test-dominance.mlir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe' 'C:\_work\llvm-project\llvm-project\mlir\test\Analysis\test-dominance.mlir' '-pass-pipeline=builtin.module(func.func(test-print-dominance))' -split-input-file
# .---command stderr------------
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0.	Program arguments: c:\\_work\\llvm-project\\llvm-project\\build\\bin\\mlir-opt.exe C:\\_work\\llvm-project\\llvm-project\\mlir\\test\\Analysis\\test-dominance.mlir -pass-pipeline=builtin.module(func.func(test-print-dominance)) -split-input-file
# | 1.	MLIR Parser: custom op parser 'func.func'
# | 2.	MLIR Parser: custom op parser 'scf.loop'
# | 3.	MLIR Parser: custom op parser 'scf.loop'
# | 4.	MLIR Parser: custom op parser 'scf.break'
# | Exception Code: 0xC0000005
# |  #0 0x00007ff6c52cc772 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x39c772)
# |  #1 0x00007ff6c63b4821 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x1484821)
# |  #2 0x00007ff6c526c5d8 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x33c5d8)
# |  #3 0x00007ff6c526c018 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x33c018)
# |  #4 0x00007ff6c526b453 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x33b453)
# |  #5 0x00007ff6c526b27e (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x33b27e)
# |  #6 0x00007ff6c740b571 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x24db571)
# |  #7 0x00007ff6c8016387 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30e6387)
# |  #8 0x00007ff6c802480e mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30f480e)
# |  #9 0x00007ff6c80222b0 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30f22b0)
# | #10 0x00007ff6c801feb3 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30efeb3)
# | #11 0x00007ff6c638ddb9 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x145ddb9)
# | #12 0x00007ff6c5052973 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x122973)
# | #13 0x00007ff6c801618c mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30e618c)
# | #14 0x00007ff6c802480e mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30f480e)
# | #15 0x00007ff6c80222b0 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30f22b0)
# | #16 0x00007ff6c801feb3 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30efeb3)
# | #17 0x00007ff6c638ddb9 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x145ddb9)
# | #18 0x00007ff6c5052973 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x122973)
# | #19 0x00007ff6c801618c mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30e618c)
# | #20 0x00007ff6c802480e mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30f480e)
# | #21 0x00007ff6c80226d1 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30f26d1)
# | #22 0x00007ff6c801feb3 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30efeb3)
# | #23 0x00007ff6c802005e mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30f005e)
# | #24 0x00007ff6c82e90ed mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x33b90ed)
# | #25 0x00007ff6c57c8cea mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x898cea)
# | #26 0x00007ff6c5052973 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x122973)
# | #27 0x00007ff6c801618c mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30e618c)
# | #28 0x00007ff6c8014540 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x30e4540)
# | #29 0x00007ff6c526100f (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x33100f)
# | #30 0x00007ff6c4f400be (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x100be)
# | #31 0x00007ff6c4f3ed56 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0xed56)
# | #32 0x00007ff6c4f3ea6a (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0xea6a)
# | #33 0x00007ff6c529f490 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x36f490)
# | #34 0x00007ff6c529f109 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x36f109)
# | #35 0x00007ff6c4f3358e (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x358e)
# | #36 0x00007ff6c4f33941 (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x3941)
# | #37 0x00007ff6c4f33cab (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x3cab)
# | #38 0x00007ff6c4f3145f (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x145f)
# | #39 0x00007ff6cc875100 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe+0x7945100)
# | #40 0x00007ffb257d4cb0 (C:\Windows\System32\KERNEL32.DLL+0x14cb0)
# | #41 0x00007ffb33e3edcb (C:\Windows\SYSTEM32\ntdll.dll+0x7edcb)
# `-----------------------------
# error: command failed with exit status: 0xc0000005
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\mlir\test\Analysis\test-dominance.mlir'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\mlir\test\Analysis\test-dominance.mlir:687:17: error: CHECK-LABEL: expected string not found in input
# | // CHECK-LABEL: Testing : func_loop_early_exit
# |                 ^
# | <stdin>:408:34: note: scanning from here
# | Testing : func_loop_nested_region
# |                                  ^
# | <stdin>:510:7: note: possible intended match here
# | dominates(0, 0) = 1 (properly = 0)
# |       ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\mlir\test\Analysis\test-dominance.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            403:  return 
# |            404:  } 
# |            405: } 
# |            406:  
# |            407: // ----- 
# |            408: Testing : func_loop_nested_region 
# | label:687'0                                      X error: no match found
# |            409: --- DominanceInfo --- 
# | label:687'0     ~~~~~~~~~~~~~~~~~~~~~~
# |            410: Nearest(0, 0) = 0 
# | label:687'0     ~~~~~~~~~~~~~~~~~~
# |            411: Nearest(0, 1) = 0 
# | label:687'0     ~~~~~~~~~~~~~~~~~~
# |            412: Nearest(0, 2) = 0 
# | label:687'0     ~~~~~~~~~~~~~~~~~~
# |            413: Nearest(0, 3) = 0 
# | label:687'0     ~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            505: Nearest(6, 3) = 6 
# | label:687'0     ~~~~~~~~~~~~~~~~~~
# |            506: Nearest(6, 4) = 6 
# | label:687'0     ~~~~~~~~~~~~~~~~~~
# |            507: Nearest(6, 5) = 6 
# | label:687'0     ~~~~~~~~~~~~~~~~~~
# |            508: Nearest(6, 6) = 6 
# | label:687'0     ~~~~~~~~~~~~~~~~~~
# |            509: --- Block Dominance relationship --- 
# | label:687'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            510: dominates(0, 0) = 1 (properly = 0) 
# | label:687'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | label:687'1           ?                             possible intended match
# |            511: dominates(0, 1) = 1 (properly = 1) 
# | label:687'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            512: dominates(0, 2) = 1 (properly = 1) 
# | label:687'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            513: dominates(0, 3) = 1 (properly = 1) 
# | label:687'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            514: dominates(0, 4) = 1 (properly = 1) 
# | label:687'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            515: dominates(0, 5) = 1 (properly = 1) 
# | label:687'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>MLIR.IR/early-exit.mlir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe --print-region-branch-op-interface C:\_work\llvm-project\llvm-project\mlir\test\IR\early-exit.mlir --split-input-file | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\mlir\test\IR\early-exit.mlir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe' --print-region-branch-op-interface 'C:\_work\llvm-project\llvm-project\mlir\test\IR\early-exit.mlir' --split-input-file
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\mlir\test\IR\early-exit.mlir:9:9: error: breaking control regions through an op that does not have the PropagateControlFlowBreak trait: "test.some_if"(%arg0) ({...}) : (i1) -> ()
# |         "test.some_break"() [2] : () -> ()
# |         ^
# | C:\_work\llvm-project\llvm-project\mlir\test\IR\early-exit.mlir:9:9: note: see current operation: "test.some_break"() [2] : () -> ()
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\mlir\test\IR\early-exit.mlir'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\mlir\test\IR\early-exit.mlir:5:17: error: CHECK-LABEL: expected string not found in input
# | // CHECK-LABEL: func @unregistered_op
# |                 ^
# | <stdin>:1:1: note: scanning from here
# | // -----
# | ^
# | <stdin>:64:7: note: possible intended match here
# |  func.func @loop_with_results(%arg0: f32) -> f32 {
# |       ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\mlir\test\IR\early-exit.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            1: // ----- 
# | label:5'0     X~~~~~~~~ error: no match found
# |            2: Found RegionBranchOpInterface operation: scf.loop {...} loc("loop1") 
# | label:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            3:  - Successor is region #0 
# | label:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            4:  - Collecting all nested predecessors 
# | label:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            5:  - Found 2 predecessor(s) 
# | label:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            6:  - Predecessor is scf.break 2 loc("break1") 
# | label:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            .
# |            .
# |            .
# |           59:  - Successor is region #0 
# | label:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           60:  - Collecting all nested predecessors 
# | label:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           61:  - Found 1 predecessor(s) 
# | label:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           62:  - Predecessor is scf.break 1 %arg0 : f32 loc("C:\\_work\\llvm-project\\llvm-project\\mlir\\test\\IR\\early-exit.mlir":63:4) 
# | label:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           63: module { 
# | label:5'0     ~~~~~~~~~
# |           64:  func.func @loop_with_results(%arg0: f32) -> f32 { 
# | label:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | label:5'1           ?                                             possible intended match
# |           65:  %0 = scf.loop -> f32 { 
# | label:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |           66:  scf.break 1 %arg0 : f32 
# | label:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |           67:  } 
# | label:5'0     ~~~
# |           68:  return %0 : f32 
# | label:5'0     ~~~~~~~~~~~~~~~~~
# |           69:  } 
# | label:5'0     ~~~
# |            .
# |            .
# |            .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the Mlir-commits mailing list