1 // RUN: mlir-opt %s -pass-pipeline='builtin.module(func.func(canonicalize))' | FileCheck %s --check-prefix=NO_FILTER
2 // RUN: mlir-opt %s -pass-pipeline='builtin.module(func.func(canonicalize{enable-patterns=TestRemoveOpWithInnerOps}))' | FileCheck %s --check-prefix=FILTER_ENABLE
3 // RUN: mlir-opt %s -pass-pipeline='builtin.module(func.func(canonicalize{disable-patterns=TestRemoveOpWithInnerOps}))' | FileCheck %s --check-prefix=FILTER_DISABLE
5 // NO_FILTER-LABEL: func @remove_op_with_inner_ops_pattern
6 // NO_FILTER-NEXT: return
7 // FILTER_ENABLE-LABEL: func @remove_op_with_inner_ops_pattern
8 // FILTER_ENABLE-NEXT: return
9 // FILTER_DISABLE-LABEL: func @remove_op_with_inner_ops_pattern
10 // FILTER_DISABLE-NEXT: "test.op_with_region_pattern"()
11 func.func @remove_op_with_inner_ops_pattern() {
12 "test.op_with_region_pattern"() ({
13 "test.op_with_region_terminator"() : () -> ()