[Mlir-commits] [mlir] [mlir][Transforms] Do not erase IR in `remove-dead-values` (PR #173505)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Dec 25 02:22:45 PST 2025


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 7263 tests passed
* 598 tests skipped
* 1 test failed

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

### MLIR
<details>
<summary>MLIR.Transforms/remove-dead-values.mlir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Transforms/remove-dead-values.mlir -remove-dead-values -split-input-file -verify-diagnostics | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Transforms/remove-dead-values.mlir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Transforms/remove-dead-values.mlir -remove-dead-values -split-input-file -verify-diagnostics
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Transforms/remove-dead-values.mlir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Transforms/remove-dead-values.mlir:88:16: error: CHECK-NOT: excluded string found in input
# |  // CHECK-NOT: tensor
# |                ^
# | <stdin>:49:19: note: found here
# |  %0 = ub.poison : tensor<1x25x13xi32>
# |                   ^~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Transforms/remove-dead-values.mlir:106:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: return
# |                ^
# | <stdin>:60:2: note: 'next' match was here
# |  return
# |  ^
# | <stdin>:58:71: note: previous match ended here
# |  func.func private @clean_func_op_remove_argument_and_return_value() {
# |                                                                       ^
# | <stdin>:59:1: note: non-matching line after previous match is here
# |  %0 = ub.poison : i32
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Transforms/remove-dead-values.mlir:123:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: return
# |                ^
# | <stdin>:72:2: note: 'next' match was here
# |  return
# |  ^
# | <stdin>:70:63: note: previous match ended here
# |  func.func private @clean_func_op_remove_side_effecting_op() {
# |                                                               ^
# | <stdin>:71:1: note: non-matching line after previous match is here
# |  %0 = ub.poison : i32
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Transforms/remove-dead-values.mlir:140:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: %[[c0:.*]] = arith.constant 0
# |                ^
# | <stdin>:80:2: note: 'next' match was here
# |  %c0_i32 = arith.constant 0 : i32
# |  ^
# | <stdin>:78:62: note: previous match ended here
# |  func.func private @clean_func_op_remove_arguments() -> i32 {
# |                                                              ^
# | <stdin>:79:1: note: non-matching line after previous match is here
# |  %0 = ub.poison : i32
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Transforms/remove-dead-values.mlir:366:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: %[[c3:.*]] = arith.constant 3
# |                ^
# | <stdin>:183:2: note: 'next' match was here
# |  %c3_i32 = arith.constant 3 : i32
# |  ^
# | <stdin>:181:29: note: previous match ended here
# |  %1 = arith.muli %0, %c2_i32 : i32
# |                             ^
# | <stdin>:182:1: note: non-matching line after previous match is here
# |  %2 = ub.poison : i32
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Transforms/remove-dead-values.mlir:400:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: return
# |                ^
# | <stdin>:199:2: note: 'next' match was here
# |  return
# |  ^
# | <stdin>:196:56: note: previous match ended here
# |  func.func private @clean_region_branch_op_erase_it() {
# |                                                        ^
# | <stdin>:197:1: note: non-matching line after previous match is here
# |  %0 = ub.poison : i32
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Transforms/remove-dead-values.mlir:706:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: ub.unreachable
# |                ^
# | <stdin>:412:2: note: 'next' match was here
# |  ub.unreachable
# |  ^
# | <stdin>:408:44: note: previous match ended here
# |  func.func private @remove_dead_branch_op() {
# |                                            ^
# | <stdin>:409:1: note: non-matching line after previous match is here
# |  %0 = ub.poison : i1
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Transforms/remove-dead-values.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           .
# |           .
# |           .
# |          44: } 
# |          45:  
# |          46: // ----- 
# |          47: module { 
# |          48:  func.func @dead_linalg_generic() { 
# |          49:  %0 = ub.poison : tensor<1x25x13xi32> 
# | not:88                         !~~~~~               error: no match expected
# |          50:  %1 = ub.poison : tensor<1x25x13xi32> 
# |          51:  %2 = ub.poison : tensor<1x25x13xi32> 
# |          52:  return 
# |          53:  } 
# |          54: } 
# |          55:  
# |          56: // ----- 
# |          57: module { 
# |          58:  func.func private @clean_func_op_remove_argument_and_return_value() { 
# |          59:  %0 = ub.poison : i32 
# |          60:  return 
# | next:106      !~~~~~  error: match on wrong line
# |          61:  } 
# |          62:  func.func @main(%arg0: i32) { 
# |          63:  call @clean_func_op_remove_argument_and_return_value() : () -> () 
# |          64:  return 
# |          65:  } 
# |          66: } 
# |          67:  
# |          68: // ----- 
# |          69: module { 
# |          70:  func.func private @clean_func_op_remove_side_effecting_op() { 
# |          71:  %0 = ub.poison : i32 
# |          72:  return 
# | next:123      !~~~~~  error: match on wrong line
# |          73:  } 
# |          74: } 
# |          75:  
# |          76: // ----- 
# |          77: module { 
# |          78:  func.func private @clean_func_op_remove_arguments() -> i32 { 
# |          79:  %0 = ub.poison : i32 
# |          80:  %c0_i32 = arith.constant 0 : i32 
# | next:140      !~~~~~~~~~~~~~~~~~~~~~~~~~        error: match on wrong line
# |          81:  return %c0_i32 : i32 
# |          82:  } 
# |          83:  func.func @main(%arg0: memref<i32>, %arg1: i32, %arg2: i32) -> (i32, memref<i32>) { 
# |          84:  %0 = test.call_on_device @clean_func_op_remove_arguments(), %arg2 : (i32) -> i32 
# |          85:  return %0, %arg0 : i32, memref<i32> 
# |           .
# |           .
# |           .
# |         178:  func.func private @clean_simple_ops(%arg0: i32, %arg1: memref<i32>) -> i32 { 
# |         179:  %0 = arith.addi %arg0, %arg0 : i32 
# |         180:  %c2_i32 = arith.constant 2 : i32 
# |         181:  %1 = arith.muli %0, %c2_i32 : i32 
# |         182:  %2 = ub.poison : i32 
# |         183:  %c3_i32 = arith.constant 3 : i32 
# | next:366      !~~~~~~~~~~~~~~~~~~~~~~~~~        error: match on wrong line
# |         184:  %3 = arith.addi %arg0, %c3_i32 : i32 
# |         185:  memref.store %3, %arg1[] : memref<i32> 
# |         186:  return %1 : i32 
# |         187:  } 
# |         188:  func.func @main(%arg0: i32, %arg1: memref<i32>, %arg2: i32) -> i32 { 
# |           .
# |           .
# |           .
# |         194: // ----- 
# |         195: module { 
# |         196:  func.func private @clean_region_branch_op_erase_it() { 
# |         197:  %0 = ub.poison : i32 
# |         198:  %1 = ub.poison : i1 
# |         199:  return 
# | next:400      !~~~~~  error: match on wrong line
# |         200:  } 
# |         201:  func.func @main(%arg0: i32, %arg1: i1) { 
# |         202:  call @clean_region_branch_op_erase_it() : () -> () 
# |         203:  return 
# |         204:  } 
# |           .
# |           .
# |           .
# |         407: module { 
# |         408:  func.func private @remove_dead_branch_op() { 
# |         409:  %0 = ub.poison : i1 
# |         410:  %1 = ub.poison : i64 
# |         411:  %2 = ub.poison : i64 
# |         412:  ub.unreachable 
# | next:706      !~~~~~~~~~~~~~  error: match on wrong line
# |         413:  ^bb1: // no predecessors 
# |         414:  return 
# |         415:  ^bb2: // no predecessors 
# |         416:  return 
# |         417:  } 
# |           .
# |           .
# |           .
# | >>>>>>
# `-----------------------------
# 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/173505


More information about the Mlir-commits mailing list