brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · dcc1079 Raw
56 lines · plain
1// RUN: mlir-opt %s --pass-pipeline='builtin.module(transform-interpreter{\2// RUN:     debug-bind-trailing-args=^test.some_returning_op,^test.some_other_returning_op})' \3// RUN:             --split-input-file --verify-diagnostics4 5// Note that diagnostic checker will merge two diagnostics with the same message6// at the same location, so only check the remark once.7// 8// expected-remark @below {{first extra}}9// expected-note @below {{value handle points to an op result #0}}10// expected-note @below {{value handle points to an op result #1}}11%0:2 = "test.some_returning_op"() : () -> (i32, i64)12 13// expected-remark @below {{first extra}}14// expected-note @below {{value handle points to an op result #0}}15%1 = "test.some_returning_op"() : () -> index16 17// Note that diagnostic checker will merge two diagnostics with the same message18// at the same location, so only check the remark once.19// 20// expected-remark @below {{second extra}}21// expected-note @below {{value handle points to an op result #0}}22// expected-note @below {{value handle points to an op result #1}}23%2:2 = "test.some_other_returning_op"() : () -> (f32, f64)24 25module attributes {transform.with_named_sequence} {26  transform.named_sequence @__transform_main(27      %arg0: !transform.any_op, %arg1: !transform.any_value,28      %arg2: !transform.any_value) {29    transform.debug.emit_remark_at %arg1, "first extra" : !transform.any_value30    transform.debug.emit_remark_at %arg2, "second extra" : !transform.any_value31    transform.yield32  }33}34 35// -----36 37%0:2 = "test.some_returning_op"() : () -> (i32, i64)38%1 = "test.some_returning_op"() : () -> index39 40module attributes {transform.with_named_sequence} {41  transform.named_sequence @__transform_main(42      // expected-error @below {{wrong kind of value provided for top-level operation handle}}43      %arg0: !transform.any_op, %arg1: !transform.any_op, %arg2: !transform.any_value) {44    transform.yield45  }46}47 48// -----49 50module attributes {transform.with_named_sequence} {51  // expected-error @below {{operation expects 1 extra value bindings, but 2 were provided to the interpreter}}52  transform.named_sequence @__transform_main(%arg0: !transform.any_op, %arg1: !transform.any_value) {53    transform.yield54  }55}56