xref: /llvm-project/mlir/test/IR/op-asm-interface.mlir (revision 3c64f86314fbf9a3cd578419f16e621a4de57eaa)
1// RUN: mlir-opt %s -split-input-file -verify-diagnostics | FileCheck %s
2
3//===----------------------------------------------------------------------===//
4// Test OpAsmOpInterface
5//===----------------------------------------------------------------------===//
6
7func.func @result_name_from_op_asm_type_interface() {
8  // CHECK-LABEL: @result_name_from_op_asm_type_interface
9  // CHECK: %op_asm_type_interface
10  %0 = "test.result_name_from_type"() : () -> !test.op_asm_type_interface
11  return
12}
13
14// -----
15
16func.func @block_argument_name_from_op_asm_type_interface() {
17  // CHECK-LABEL: @block_argument_name_from_op_asm_type_interface
18  // CHECK: ^bb0(%op_asm_type_interface
19  test.block_argument_name_from_type {
20    ^bb0(%arg0: !test.op_asm_type_interface):
21      "test.terminator"() : ()->()
22  }
23  return
24}
25