1// UNSUPPORTED: system-windows
2// RUN: mlir-reduce %s -test %S/failure-test.sh -pass-test function-reducer | 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 @simple1() {
9  return
10}
11
12// CHECK-NOT: func @simple2() {
13func @simple2() {
14  return
15}
16
17// CHECK-LABEL: func @simple3() {
18func @simple3() {
19  "test.crashOp" () : () -> ()
20  return
21}
22
23// CHECK-NOT: func @simple4() {
24func @simple4(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) {
25  cond_br %arg0, ^bb1, ^bb2
26^bb1:
27  br ^bb3(%arg1 : memref<2xf32>)
28^bb2:
29  %0 = alloc() : memref<2xf32>
30  br ^bb3(%0 : memref<2xf32>)
31^bb3(%1: memref<2xf32>):
32  "test.crashOp"(%1, %arg2) : (memref<2xf32>, memref<2xf32>) -> ()
33  return
34}
35
36// CHECK-NOT: func @simple5() {
37func @simple5() {
38  return
39}
40