Mercurial > hg > CbC > CbC_llvm
comparison mlir/test/mlir-tblgen/op-error.td @ 236:c4bab56944e8 llvm-original
LLVM 16
author | kono |
---|---|
date | Wed, 09 Nov 2022 17:45:10 +0900 |
parents | 79ff65ed7e25 |
children |
comparison
equal
deleted
inserted
replaced
232:70dce7da266c | 236:c4bab56944e8 |
---|---|
1 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s | 1 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s |
2 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR2 %s 2>&1 | FileCheck --check-prefix=ERROR2 %s | 2 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR2 %s 2>&1 | FileCheck --check-prefix=ERROR2 %s |
3 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR3 %s 2>&1 | FileCheck --check-prefix=ERROR3 %s | 3 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR3 %s 2>&1 | FileCheck --check-prefix=ERROR3 %s |
4 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR4 %s 2>&1 | FileCheck --check-prefix=ERROR4 %s | |
5 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR5 %s 2>&1 | FileCheck --check-prefix=ERROR5 %s | |
6 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR6 %s 2>&1 | FileCheck --check-prefix=ERROR6 %s | |
7 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR7 %s 2>&1 | FileCheck --check-prefix=ERROR7 %s | |
8 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR8 %s 2>&1 | FileCheck --check-prefix=ERROR8 %s | |
9 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR9 %s 2>&1 | FileCheck --check-prefix=ERROR9 %s | |
10 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR10 %s 2>&1 | FileCheck --check-prefix=ERROR10 %s | |
11 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR11 %s 2>&1 | FileCheck --check-prefix=ERROR11 %s | |
12 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR12 %s 2>&1 | FileCheck --check-prefix=ERROR12 %s | |
13 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR13 %s 2>&1 | FileCheck --check-prefix=ERROR13 %s | |
4 | 14 |
5 include "mlir/IR/OpBase.td" | 15 include "mlir/IR/OpBase.td" |
6 | 16 |
7 def Test_Dialect : Dialect { | 17 def Test_Dialect : Dialect { |
8 let name = "test_dialect"; | 18 let name = "test_dialect"; |
32 let builders = [ | 42 let builders = [ |
33 OpBuilder<(ins CArg<"int", "42">, CArg<"int">)> | 43 OpBuilder<(ins CArg<"int", "42">, CArg<"int">)> |
34 ]; | 44 ]; |
35 } | 45 } |
36 #endif | 46 #endif |
47 | |
48 #ifdef ERROR4 | |
49 // ERROR4: error: op has a conflict with two operands having the same name 'tensor' | |
50 def OpWithDuplicatedArgNames : Op<Test_Dialect, "default_value"> { | |
51 let arguments = (ins AnyTensor:$tensor, AnyTensor:$tensor); | |
52 } | |
53 #endif | |
54 | |
55 #ifdef ERROR5 | |
56 // ERROR5: error: op has a conflict with two results having the same name 'tensor' | |
57 def OpWithDuplicatedResultNames : Op<Test_Dialect, "default_value"> { | |
58 let results = (outs AnyTensor:$tensor, AnyTensor:$tensor); | |
59 } | |
60 #endif | |
61 | |
62 #ifdef ERROR6 | |
63 // ERROR6: error: op has a conflict with operands and results both having an entry with the name 'tensor' | |
64 def OpWithDuplicatedArgResultNames : Op<Test_Dialect, "default_value"> { | |
65 let arguments = (ins AnyTensor:$tensor); | |
66 let results = (outs AnyTensor:$tensor); | |
67 } | |
68 #endif | |
69 | |
70 #ifdef ERROR7 | |
71 // ERROR7: error: op has a conflict with operands and regions both having an entry with the name 'tensor' | |
72 def OpWithDuplicatedArgResultNames : Op<Test_Dialect, "default_value"> { | |
73 let arguments = (ins AnyTensor:$tensor); | |
74 let regions = (region AnyRegion:$tensor); | |
75 } | |
76 #endif | |
77 | |
78 #ifdef ERROR8 | |
79 // ERROR8: error: op has a conflict with results and regions both having an entry with the name 'tensor' | |
80 def OpWithDuplicatedArgResultNames : Op<Test_Dialect, "default_value"> { | |
81 let results = (outs AnyTensor:$tensor); | |
82 let regions = (region AnyRegion:$tensor); | |
83 } | |
84 #endif | |
85 | |
86 #ifdef ERROR9 | |
87 // ERROR9: error: op has a conflict with operands and successors both having an entry with the name 'target' | |
88 def OpWithDuplicatedArgResultNames : Op<Test_Dialect, "default_value"> { | |
89 let successors = (successor AnySuccessor:$target); | |
90 let arguments = (ins AnyTensor:$target); | |
91 } | |
92 #endif | |
93 | |
94 #ifdef ERROR10 | |
95 // ERROR10: error: op has a conflict with results and successors both having an entry with the name 'target' | |
96 def OpWithDuplicatedArgResultNames : Op<Test_Dialect, "default_value"> { | |
97 let successors = (successor AnySuccessor:$target); | |
98 let results = (outs AnyTensor:$target); | |
99 } | |
100 #endif | |
101 | |
102 #ifdef ERROR11 | |
103 // ERROR11: error: op has a conflict with regions and successors both having an entry with the name 'target' | |
104 def OpWithDuplicatedArgResultNames : Op<Test_Dialect, "default_value"> { | |
105 let successors = (successor AnySuccessor:$target); | |
106 let regions = (region AnyRegion:$target); | |
107 } | |
108 #endif | |
109 | |
110 #ifdef ERROR12 | |
111 def OpTraitA : NativeOpTrait<"OpTraitA"> {} | |
112 def OpTraitB : NativeOpTrait<"OpTraitB", [OpTraitA]> {} | |
113 | |
114 // ERROR12: error: OpTraitB requires OpTraitA to precede it in traits list | |
115 def OpTraitWithoutDependentTrait : Op<Test_Dialect, "default_value", [OpTraitB]> {} | |
116 #endif | |
117 | |
118 #ifdef ERROR13 | |
119 def OpTraitA : NativeOpTrait<"OpTraitA"> {} | |
120 def OpInterfaceB : OpInterface<"OpInterfaceB"> { | |
121 let dependentTraits = [OpTraitA]; | |
122 } | |
123 | |
124 // ERROR13: error: OpInterfaceB::Trait requires OpTraitA to precede it in traits list | |
125 def OpInterfaceWithoutDependentTrait : Op<Test_Dialect, "default_value", [OpInterfaceB]> {} | |
126 #endif |