File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -300,14 +300,40 @@ def testPrintIrAfterAll():
300300 pm = PassManager .parse ("builtin.module(canonicalize)" )
301301 ctx .enable_multithreading (False )
302302 pm .enable_ir_printing ()
303- # CHECK: // -----// IR Dump Before Canonicalizer (canonicalize) ('builtin.module' operation) //----- //
303+ # CHECK: // -----// IR Dump After Canonicalizer (canonicalize) //----- //
304+ # CHECK: module {
305+ # CHECK: func.func @main() {
306+ # CHECK: return
307+ # CHECK: }
308+ # CHECK: }
309+ pm .run (module )
310+
311+
312+ # CHECK-LABEL: TEST: testPrintIrBeforeAndAfterAll
313+ @run
314+ def testPrintIrBeforeAndAfterAll ():
315+ with Context () as ctx :
316+ module = ModuleOp .parse (
317+ """
318+ module {
319+ func.func @main() {
320+ %0 = arith.constant 10
321+ return
322+ }
323+ }
324+ """
325+ )
326+ pm = PassManager .parse ("builtin.module(canonicalize)" )
327+ ctx .enable_multithreading (False )
328+ pm .enable_ir_printing (print_before_all = True , print_after_all = True )
329+ # CHECK: // -----// IR Dump Before Canonicalizer (canonicalize) //----- //
304330 # CHECK: module {
305331 # CHECK: func.func @main() {
306332 # CHECK: %[[C10:.*]] = arith.constant 10 : i64
307333 # CHECK: return
308334 # CHECK: }
309335 # CHECK: }
310- # CHECK: // -----// IR Dump After Canonicalizer (canonicalize) ('builtin.module' operation) //----- //
336+ # CHECK: // -----// IR Dump After Canonicalizer (canonicalize) //----- //
311337 # CHECK: module {
312338 # CHECK: func.func @main() {
313339 # CHECK: return
You can’t perform that action at this time.
0 commit comments