[mlir] Fix broken build in pass_manager.py

This test ensures that an error is generated from the Python side when running a module pass on a function. The test used to instantiate ViewOpGraph, however, this pass was changed into a general "any op" pass in D106253. Therefore, a different pass must be used in this test.

Differential Revision: https://reviews.llvm.org/D107424
This commit is contained in:
Matthias Springer 2021-08-04 13:10:42 +09:00
parent 9bd02c433b
commit faeb7ec68b
1 changed files with 3 additions and 3 deletions

View File

@ -71,10 +71,10 @@ run(testParseFail)
def testInvalidNesting():
with Context():
try:
pm = PassManager.parse("builtin.func(view-op-graph)")
pm = PassManager.parse("builtin.func(normalize-memrefs)")
except ValueError as e:
# CHECK: Can't add pass 'ViewOpGraphPass' restricted to 'builtin.module' on a PassManager intended to run on 'builtin.func', did you intend to nest?
# CHECK: ValueError exception: invalid pass pipeline 'builtin.func(view-op-graph)'.
# CHECK: Can't add pass 'NormalizeMemRefs' restricted to 'builtin.module' on a PassManager intended to run on 'builtin.func', did you intend to nest?
# CHECK: ValueError exception: invalid pass pipeline 'builtin.func(normalize-memrefs)'.
log("ValueError exception:", e)
else:
log("Exception not produced")