1 // RUN: mlir-opt %s | mlir-opt | FileCheck %s
3 // CHECK: irdl.dialect @testvar {
4 irdl.dialect @testvar {
6 // CHECK-LABEL: irdl.operation @single_operand {
7 // CHECK-NEXT: %[[v0:[^ ]*]] = irdl.is i32
8 // CHECK-NEXT: irdl.operands(%[[v0]])
10 irdl.operation @single_operand {
12 irdl.operands(single %0)
15 // CHECK-LABEL: irdl.operation @var_operand {
16 // CHECK-NEXT: %[[v0:[^ ]*]] = irdl.is i16
17 // CHECK-NEXT: %[[v1:[^ ]*]] = irdl.is i32
18 // CHECK-NEXT: %[[v2:[^ ]*]] = irdl.is i64
19 // CHECK-NEXT: irdl.operands(%[[v0]], variadic %[[v1]], %[[v2]])
21 irdl.operation @var_operand {
25 irdl.operands(%0, variadic %1, %2)
28 // CHECK-LABEL: irdl.operation @opt_operand {
29 // CHECK-NEXT: %[[v0:[^ ]*]] = irdl.is i16
30 // CHECK-NEXT: %[[v1:[^ ]*]] = irdl.is i32
31 // CHECK-NEXT: %[[v2:[^ ]*]] = irdl.is i64
32 // CHECK-NEXT: irdl.operands(%[[v0]], optional %[[v1]], %[[v2]])
34 irdl.operation @opt_operand {
38 irdl.operands(%0, optional %1, %2)
41 // CHECK-LABEL: irdl.operation @var_and_opt_operand {
42 // CHECK-NEXT: %[[v0:[^ ]*]] = irdl.is i16
43 // CHECK-NEXT: %[[v1:[^ ]*]] = irdl.is i32
44 // CHECK-NEXT: %[[v2:[^ ]*]] = irdl.is i64
45 // CHECK-NEXT: irdl.operands(variadic %[[v0]], optional %[[v1]], %[[v2]])
47 irdl.operation @var_and_opt_operand {
51 irdl.operands(variadic %0, optional %1, %2)
55 // CHECK-LABEL: irdl.operation @single_result {
56 // CHECK-NEXT: %[[v0:[^ ]*]] = irdl.is i32
57 // CHECK-NEXT: irdl.results(%[[v0]])
59 irdl.operation @single_result {
61 irdl.results(single %0)
64 // CHECK-LABEL: irdl.operation @var_result {
65 // CHECK-NEXT: %[[v0:[^ ]*]] = irdl.is i16
66 // CHECK-NEXT: %[[v1:[^ ]*]] = irdl.is i32
67 // CHECK-NEXT: %[[v2:[^ ]*]] = irdl.is i64
68 // CHECK-NEXT: irdl.results(%[[v0]], variadic %[[v1]], %[[v2]])
70 irdl.operation @var_result {
74 irdl.results(%0, variadic %1, %2)
77 // CHECK-LABEL: irdl.operation @opt_result {
78 // CHECK-NEXT: %[[v0:[^ ]*]] = irdl.is i16
79 // CHECK-NEXT: %[[v1:[^ ]*]] = irdl.is i32
80 // CHECK-NEXT: %[[v2:[^ ]*]] = irdl.is i64
81 // CHECK-NEXT: irdl.results(%[[v0]], optional %[[v1]], %[[v2]])
83 irdl.operation @opt_result {
87 irdl.results(%0, optional %1, %2)
90 // CHECK-LABEL: irdl.operation @var_and_opt_result {
91 // CHECK-NEXT: %[[v0:[^ ]*]] = irdl.is i16
92 // CHECK-NEXT: %[[v1:[^ ]*]] = irdl.is i32
93 // CHECK-NEXT: %[[v2:[^ ]*]] = irdl.is i64
94 // CHECK-NEXT: irdl.results(variadic %[[v0]], optional %[[v1]], %[[v2]])
96 irdl.operation @var_and_opt_result {
100 irdl.results(variadic %0, optional %1, %2)