xref: /llvm-project/mlir/test/mlir-reduce/dce-test.mlir (revision 63237cddc1d0c1d0e5541d2d69954d6dde843da3)
1// UNSUPPORTED: system-windows
2// RUN: mlir-reduce %s -opt-reduction-pass='opt-pass=symbol-dce test=%S/failure-test.sh' | FileCheck %s
3// This input should be reduced by the pass pipeline so that only
4// the @simple1 function remains as the other functions should be
5// removed by the dead code elimination pass.
6
7// CHECK-NOT: func private @dead_private_function
8func.func private @dead_private_function()
9
10// CHECK-NOT: func nested @dead_nested_function
11func.func nested @dead_nested_function()
12
13// CHECK-LABEL: func @simple1(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
14func.func @simple1(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
15  "test.op_crash" () : () -> ()
16  return
17}
18