xref: /llvm-project/mlir/test/Pass/dynamic-pipeline-fail-on-parent.mlir (revision 13bd41096286305ee603428f6adf161f52981827)
1// RUN: mlir-opt %s -pass-pipeline='builtin.module(builtin.module(test-dynamic-pipeline{op-name=inner_mod1 run-on-parent=1 dynamic-pipeline=test-patterns}))'  -split-input-file -verify-diagnostics
2
3// Verify that we fail to schedule a dynamic pipeline on the parent operation.
4
5// expected-error @+1 {{'builtin.module' op Trying to schedule a dynamic pipeline on an operation that isn't nested under the current operation}}
6module {
7module @inner_mod1 {
8  "test.symbol"() {sym_name = "foo"} : () -> ()
9  func.func private @bar()
10}
11}
12