xref: /llvm-project/mlir/test/mlir-reduce/multiple-function.mlir (revision 63237cddc1d0c1d0e5541d2d69954d6dde843da3)
1// UNSUPPORTED: system-windows
2// RUN: mlir-reduce %s -reduction-tree='traversal-mode=0 test=%S/failure-test.sh' | FileCheck %s
3// This input should be reduced by the pass pipeline so that only
4// the @simple5 function remains as this is the shortest function
5// containing the interesting behavior.
6
7// CHECK-NOT: func @simple1() {
8func.func @simple1() {
9  return
10}
11
12// CHECK-NOT: func @simple2() {
13func.func @simple2() {
14  return
15}
16
17// CHECK-LABEL: func @simple3() {
18func.func @simple3() {
19  "test.op_crash" () : () -> ()
20  return
21}
22
23// CHECK-NOT: func @simple4() {
24func.func @simple4(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
25  cf.cond_br %arg0, ^bb1, ^bb2
26^bb1:
27  cf.br ^bb3(%arg1 : memref<2xf32>)
28^bb2:
29  %0 = memref.alloc() : memref<2xf32>
30  cf.br ^bb3(%0 : memref<2xf32>)
31^bb3(%1: memref<2xf32>):
32  "test.op_crash"(%1, %arg2) : (memref<2xf32>, memref<2xf32>) -> ()
33  return
34}
35
36// CHECK-NOT: func @simple5() {
37func.func @simple5() {
38  return
39}
40