view mlir/test/IR/pretty-region-args.mlir @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1f2b6ac9f198
children
line wrap: on
line source

// RUN: mlir-opt -allow-unregistered-dialect %s | FileCheck %s

// CHECK-LABEL: func @custom_region_names
func.func @custom_region_names() -> () {
  "test.polyfor"() ({
  ^bb0(%arg0: index, %arg1: index, %arg2: index):
    "foo"() : () -> ()
  }) { arg_names = ["i", "j", "k"] } : () -> ()
  // CHECK: test.polyfor %i, %j, %k
  return
}

// CHECK-LABEL: func @weird_names
// Make sure the asmprinter handles weird names correctly.
func.func @weird_names() -> () {
  "test.polyfor"() ({
  ^bb0(%arg0: i32, %arg1: i32, %arg2: index):
    "foo"() : () -> i32
  }) { arg_names = ["a .^x", "0"] } : () -> ()
  // CHECK: test.polyfor %a_.5Ex, %_0, %arg0
  // CHECK-NEXT: %0 = "foo"()
  return
}