brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1011 B · a82089b Raw
29 lines · plain
1// # RUN: mlir-opt %s -split-input-file | FileCheck %s2// # RUN: mlir-opt %s -mlir-print-op-generic -split-input-file  | FileCheck %s --check-prefix=GENERIC3 4// Check that `printCustomOrGenericOp` and `printGenericOp` print the right5// assembly format. For operations without custom format, both should print the6// generic format.7 8// CHECK-LABEL: func @op_with_custom_printer9// CHECK-GENERIC-LABEL: "func"()10func.func @op_with_custom_printer() {11  %x = test.string_attr_pretty_name12  // CHECK: %x = test.string_attr_pretty_name13  // GENERIC: %0 = "test.string_attr_pretty_name"()14  return15  // CHECK: return16  // GENERIC: "func.return"()17}18 19// -----20 21// CHECK-LABEL: func @op_without_custom_printer22// CHECK-GENERIC: "func"()23func.func @op_without_custom_printer() {24  // CHECK: "test.result_type_with_trait"() : () -> !test.test_type_with_trait25  // GENERIC: "test.result_type_with_trait"() : () -> !test.test_type_with_trait26  "test.result_type_with_trait"() : () -> !test.test_type_with_trait27  return28}29