brintos

brintos / llvm-project-archived public Read only

0
0
Text · 889 B · dfd17d5 Raw
25 lines · plain
1// RUN: mlir-opt %s -verify-diagnostics -pass-pipeline='builtin.module(any(cse, test-interface-pass))' -allow-unregistered-dialect -o /dev/null2 3// Test that we execute generic pipelines correctly. The `cse` pass is fully generic and should execute4// on both the module and the func. The `test-interface-pass` filters based on FunctionOpInterface and5// should only execute on the func.6 7// expected-remark@below {{Executing interface pass on operation}}8func.func @main() -> (i1, i1) {9  // CHECK-LABEL: func @main10  // CHECK-NEXT: arith.constant true11  // CHECK-NEXT: return12  %true = arith.constant true13  %true1 = arith.constant true14  return %true, %true1 : i1, i115}16 17module @module {18  // CHECK-LABEL: module @main19  // CHECK-NEXT: arith.constant true20  // CHECK-NEXT: foo.op21  %true = arith.constant true22  %true1 = arith.constant true23  "foo.op"(%true, %true1) : (i1, i1) -> ()24}25