Skip to content

Commit 0254b0b

Browse files
committed
[mlir][NFC] Update textual references of func to func.func in LLVM/Math/MemRef/NVGPU/OpenACC/OpenMP/Quant/SCF/Shape tests
The special case parsing of `func` operations is being removed.
1 parent 92d38ad commit 0254b0b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1024
-1024
lines changed

mlir/test/Dialect/LLVMIR/canonicalize.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ llvm.func @fold_gep(%x : !llvm.ptr<i8>) -> !llvm.ptr<i8> {
106106
// resulting constant is created in the arith dialect because the last folded
107107
// operation belongs to it.
108108
// CHECK-LABEL: llvm_constant
109-
func @llvm_constant() -> i32 {
109+
func.func @llvm_constant() -> i32 {
110110
// CHECK-NOT: llvm.mlir.constant
111111
%0 = llvm.mlir.constant(40 : i32) : i32
112112
%1 = llvm.mlir.constant(42 : i32) : i32

mlir/test/Dialect/LLVMIR/global.mlir

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ llvm.mlir.global external @has_thr_local(42 : i64) {thr_local} : i64
6363
llvm.mlir.global external @has_dso_local(42 : i64) {dso_local} : i64
6464

6565
// CHECK-LABEL: references
66-
func @references() {
66+
func.func @references() {
6767
// CHECK: llvm.mlir.addressof @global : !llvm.ptr<i64>
6868
%0 = llvm.mlir.addressof @global : !llvm.ptr<i64>
6969

@@ -109,7 +109,7 @@ llvm.mlir.global internal constant @constant(37.0) : !llvm.label
109109

110110
// -----
111111

112-
func @foo() {
112+
func.func @foo() {
113113
// expected-error @+1 {{must appear at the module level}}
114114
llvm.mlir.global internal @bar(42) : i32
115115

@@ -135,14 +135,14 @@ llvm.mlir.global internal @more_than_one_type(0) : i64, i32
135135

136136
llvm.mlir.global internal @foo(0: i32) : i32
137137

138-
func @bar() {
138+
func.func @bar() {
139139
// expected-error @+2{{expected ':'}}
140140
llvm.mlir.addressof @foo
141141
}
142142

143143
// -----
144144

145-
func @foo() {
145+
func.func @foo() {
146146
// The attribute parser will consume the first colon-type, so we put two of
147147
// them to trigger the attribute type mismatch error.
148148
// expected-error @+1 {{invalid kind of attribute specified}}
@@ -151,7 +151,7 @@ func @foo() {
151151

152152
// -----
153153

154-
func @foo() {
154+
func.func @foo() {
155155
// expected-error @+1 {{must reference a global defined by 'llvm.mlir.global'}}
156156
llvm.mlir.addressof @foo : !llvm.ptr<func<void ()>>
157157
}
@@ -160,7 +160,7 @@ func @foo() {
160160

161161
llvm.mlir.global internal @foo(0: i32) : i32
162162

163-
func @bar() {
163+
func.func @bar() {
164164
// expected-error @+1 {{the type must be a pointer to the type of the referenced global}}
165165
llvm.mlir.addressof @foo : !llvm.ptr<i64>
166166
}
@@ -200,15 +200,15 @@ llvm.mlir.global internal @g(43 : i64) : i64 {
200200
// -----
201201

202202
llvm.mlir.global internal @g(32 : i64) {addr_space = 3: i32} : i64
203-
func @mismatch_addr_space_implicit_global() {
203+
func.func @mismatch_addr_space_implicit_global() {
204204
// expected-error @+1 {{op the type must be a pointer to the type of the referenced global}}
205205
llvm.mlir.addressof @g : !llvm.ptr<i64>
206206
}
207207

208208
// -----
209209

210210
llvm.mlir.global internal @g(32 : i64) {addr_space = 3: i32} : i64
211-
func @mismatch_addr_space() {
211+
func.func @mismatch_addr_space() {
212212
// expected-error @+1 {{op the type must be a pointer to the type of the referenced global}}
213213
llvm.mlir.addressof @g : !llvm.ptr<i64, 4>
214214
}

0 commit comments

Comments
 (0)