1 // # RUN: mlir-opt %s -split-input-file | FileCheck %s
2 // # RUN: mlir-opt %s -mlir-print-op-generic -split-input-file | FileCheck %s --check-prefix=GENERIC
4 // Check that `printCustomOrGenericOp` and `printGenericOp` print the right
5 // assembly format. For operations without custom format, both should print the
8 // CHECK-LABEL: func @op_with_custom_printer
9 // CHECK-GENERIC-LABEL: "func"()
10 func.func @op_with_custom_printer() {
11 %x = test.string_attr_pretty_name
12 // CHECK: %x = test.string_attr_pretty_name
13 // GENERIC: %0 = "test.string_attr_pretty_name"()
16 // GENERIC: "func.return"()
21 // CHECK-LABEL: func @op_without_custom_printer
22 // CHECK-GENERIC: "func"()
23 func.func @op_without_custom_printer() {
24 // CHECK: "test.result_type_with_trait"() : () -> !test.test_type_with_trait
25 // GENERIC: "test.result_type_with_trait"() : () -> !test.test_type_with_trait
26 "test.result_type_with_trait"() : () -> !test.test_type_with_trait