llvm-project
23 строки · 690.0 Байт
1// RUN: mlir-opt -allow-unregistered-dialect %s | FileCheck %s
2
3// CHECK-LABEL: func @custom_region_names
4func.func @custom_region_names() -> () {
5"test.polyfor"() ({
6^bb0(%arg0: index, %arg1: index, %arg2: index):
7"foo"() : () -> ()
8}) { arg_names = ["i", "j", "k"] } : () -> ()
9// CHECK: test.polyfor %i, %j, %k
10return
11}
12
13// CHECK-LABEL: func @weird_names
14// Make sure the asmprinter handles weird names correctly.
15func.func @weird_names() -> () {
16"test.polyfor"() ({
17^bb0(%arg0: i32, %arg1: i32, %arg2: index):
18"foo"() : () -> i32
19}) { arg_names = ["a .^x", "0"] } : () -> ()
20// CHECK: test.polyfor %a_.5Ex, %_0, %arg0
21// CHECK-NEXT: %0 = "foo"()
22return
23}
24
25