1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
// RUN: mlir-opt %s --pass-pipeline='builtin.module(test-transform-dialect-interpreter{bind-first-extra-to-ops=func.func bind-second-extra-to-ops=func.return})' \
// RUN: --split-input-file --verify-diagnostics
transform.sequence failures(propagate) {
^bb0(%arg0: !transform.any_op, %arg1: !transform.any_op, %arg2: !transform.any_op):
transform.test_print_remark_at_operand %arg1, "first extra" : !transform.any_op
transform.test_print_remark_at_operand %arg2, "second extra" : !transform.any_op
}
// expected-remark @below {{first extra}}
func.func @foo() {
// expected-remark @below {{second extra}}
return
}
// expected-remark @below {{first extra}}
func.func @bar(%arg0: i1) {
cf.cond_br %arg0, ^bb1, ^bb2
^bb1:
// expected-remark @below {{second extra}}
return
^bb2:
// expected-remark @below {{second extra}}
return
}
// -----
transform.sequence failures(propagate) {
^bb0(%arg0: !transform.any_op, %arg1: !transform.any_op, %arg2: !transform.param<i64>):
// expected-error @above {{wrong kind of value provided for top-level parameter}}
}
func.func @foo() {
return
}
// -----
transform.sequence failures(propagate) {
^bb0(%arg0: !transform.any_op, %arg1: !transform.any_op, %arg2: !transform.any_value):
// expected-error @above {{wrong kind of value provided for the top-level value handle}}
}
func.func @foo() {
return
}
// -----
// expected-error @below {{operation expects 1 extra value bindings, but 2 were provided to the interpreter}}
transform.sequence failures(propagate) {
^bb0(%arg0: !transform.any_op, %arg1: !transform.any_op):
}
// -----
transform.sequence failures(propagate) {
^bb0(%arg0: !transform.any_op, %arg1: !transform.any_op, %arg2: !transform.any_op):
transform.sequence %arg0, %arg1, %arg2 : !transform.any_op, !transform.any_op, !transform.any_op failures(propagate) {
^bb0(%arg3: !transform.any_op, %arg4: !transform.any_op, %arg5: !transform.any_op):
transform.test_print_remark_at_operand %arg4, "first extra" : !transform.any_op
transform.test_print_remark_at_operand %arg5, "second extra" : !transform.any_op
}
}
// expected-remark @below {{first extra}}
func.func @foo() {
// expected-remark @below {{second extra}}
return
}
// expected-remark @below {{first extra}}
func.func @bar(%arg0: i1) {
cf.cond_br %arg0, ^bb1, ^bb2
^bb1:
// expected-remark @below {{second extra}}
return
^bb2:
// expected-remark @below {{second extra}}
return
}
|