1// RUN: mlir-opt -test-print-defuse  -allow-unregistered-dialect %s | FileCheck %s
2
3// CHECK: Visiting op 'dialect.op1' with 0 operands:
4// CHECK: Has 4 results:
5// CHECK:   - Result 0 has a single use:     - dialect.op2
6// CHECK:   - Result 1 has no uses
7// CHECK:   - Result 2 has 2 uses:
8// CHECK:     - dialect.innerop1
9// CHECK:     - dialect.op2
10// CHECK:   - Result 3 has no uses
11// CHECK: Visiting op 'dialect.op2' with 2 operands:
12// CHECK:   - Operand produced by operation 'dialect.op1'
13// CHECK:   - Operand produced by operation 'dialect.op1'
14// CHECK: Has 0 results:
15// CHECK: Visiting op 'dialect.innerop1' with 2 operands:
16// CHECK:   - Operand produced by Block argument, number 0
17// CHECK:   - Operand produced by operation 'dialect.op1'
18// CHECK: Has 0 results:
19// CHECK: Visiting op 'dialect.op3' with 0 operands:
20// CHECK: Has 0 results:
21// CHECK: Visiting op 'module_terminator' with 0 operands:
22// CHECK: Has 0 results:
23// CHECK: Visiting op 'module' with 0 operands:
24// CHECK: Has 0 results:
25
26%results:4 = "dialect.op1"() : () -> (i1, i16, i32, i64)
27"dialect.op2"(%results#0, %results#2) : (i1, i32) -> ()
28"dialect.op3"() ({
29  ^bb0(%arg0 : i1):
30    "dialect.innerop1"(%arg0, %results#2) : (i1, i32) -> ()
31}) : () -> ()
32