57 lines · plain
1// RUN: mlir-opt -test-print-nesting -allow-unregistered-dialect %s | FileCheck %s2 3// CHECK: visiting op: 'builtin.module' with 0 operands and 0 results4// CHECK: 1 nested regions:5// CHECK: Region with 1 blocks:6// CHECK: Block with 0 arguments, 0 successors, and 2 operations7"builtin.module"() ( {8 9 10// CHECK: visiting op: 'dialect.op1' with 0 operands and 4 results11// CHECK: 1 attributes:12// CHECK: - 'attribute name' : '42 : i32'13// CHECK: 0 nested regions:14 %results:4 = "dialect.op1"() { "attribute name" = 42 : i32 } : () -> (i1, i16, i32, i64)15 16 17// CHECK: visiting op: 'dialect.op2' with 0 operands and 0 results18// CHECK: 1 attributes:19// CHECK: - 'other attribute' : '42 : i64'20// CHECK: 2 nested regions:21 "dialect.op2"() ({22 23// CHECK: Region with 1 blocks:24// CHECK: Block with 0 arguments, 0 successors, and 1 operations25// CHECK: visiting op: 'dialect.innerop1' with 2 operands and 0 results26// CHECK: 0 nested regions:27 "dialect.innerop1"(%results#0, %results#1) : (i1, i16) -> ()28 29// CHECK: Region with 3 blocks:30 },{31 32// CHECK: Block with 0 arguments, 2 successors, and 2 operations33// CHECK: visiting op: 'dialect.innerop2' with 0 operands and 0 results34// CHECK: 0 nested regions:35 "dialect.innerop2"() : () -> ()36// CHECK: visiting op: 'dialect.innerop3' with 3 operands and 0 results37// CHECK: 0 nested regions:38 "dialect.innerop3"(%results#0, %results#2, %results#3)[^bb1, ^bb2] : (i1, i32, i64) -> ()39// CHECK: Block with 1 arguments, 0 successors, and 2 operations40 ^bb1(%arg1 : i32):41// CHECK: visiting op: 'dialect.innerop4' with 0 operands and 0 results42// CHECK: 0 nested regions:43 "dialect.innerop4"() : () -> ()44// CHECK: visiting op: 'dialect.innerop5' with 0 operands and 0 results45// CHECK: 0 nested regions:46 "dialect.innerop5"() : () -> ()47// CHECK: Block with 1 arguments, 0 successors, and 2 operations48 ^bb2(%arg2 : i64):49// CHECK: visiting op: 'dialect.innerop6' with 0 operands and 0 results50// CHECK: 0 nested regions:51 "dialect.innerop6"() : () -> ()52// CHECK: visiting op: 'dialect.innerop7' with 0 operands and 0 results53// CHECK: 0 nested regions:54 "dialect.innerop7"() : () -> ()55 }) {"other attribute" = 42 : i64} : () -> ()56}) : () -> ()57