1 // RUN: mlir-opt %s -verify-diagnostics -pass-pipeline='builtin.module(any(cse, test-interface-pass))' -allow-unregistered-dialect -o /dev/null
3 // Test that we execute generic pipelines correctly. The `cse` pass is fully generic and should execute
4 // on both the module and the func. The `test-interface-pass` filters based on FunctionOpInterface and
5 // should only execute on the func.
7 // expected-remark@below {{Executing interface pass on operation}}
8 func.func @main() -> (i1, i1) {
9 // CHECK-LABEL: func @main
10 // CHECK-NEXT: arith.constant true
12 %true = arith.constant true
13 %true1 = arith.constant true
14 return %true, %true1 : i1, i1
18 // CHECK-LABEL: module @main
19 // CHECK-NEXT: arith.constant true
21 %true = arith.constant true
22 %true1 = arith.constant true
23 "foo.op"(%true, %true1) : (i1, i1) -> ()