Skip to content

Commit 8c6d4c8

Browse files
committed
Revert "Update tests"
This reverts commit bc34970.
1 parent 2ab414f commit 8c6d4c8

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

mlir/test/Dialect/SPIRV/IR/control-flow-ops.mlir

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,48 @@ spirv.module Logical GLSL450 {
210210

211211
// -----
212212

213+
spirv.module Logical GLSL450 {
214+
spirv.func @f_result_type_mismatch(%arg0 : i32, %arg1 : i32) -> () "None" {
215+
// expected-error @+1 {{has incorrect number of results has for callee: expected 0, but provided 1}}
216+
%1 = spirv.FunctionCall @f_result_type_mismatch(%arg0, %arg0) : (i32, i32) -> (i32)
217+
spirv.Return
218+
}
219+
}
220+
221+
// -----
222+
223+
spirv.module Logical GLSL450 {
224+
spirv.func @f_type_mismatch(%arg0 : i32, %arg1 : i32) -> () "None" {
225+
// expected-error @+1 {{has incorrect number of operands for callee: expected 2, but provided 1}}
226+
spirv.FunctionCall @f_type_mismatch(%arg0) : (i32) -> ()
227+
spirv.Return
228+
}
229+
}
230+
231+
// -----
232+
233+
spirv.module Logical GLSL450 {
234+
spirv.func @f_type_mismatch(%arg0 : i32, %arg1 : i32) -> () "None" {
235+
%0 = spirv.Constant 2.0 : f32
236+
// expected-error @+1 {{operand type mismatch: expected operand type 'i32', but provided 'f32' for operand number 1}}
237+
spirv.FunctionCall @f_type_mismatch(%arg0, %0) : (i32, f32) -> ()
238+
spirv.Return
239+
}
240+
}
241+
242+
// -----
243+
244+
spirv.module Logical GLSL450 {
245+
spirv.func @f_type_mismatch(%arg0 : i32, %arg1 : i32) -> i32 "None" {
246+
%cst = spirv.Constant 0: i32
247+
// expected-error @+1 {{result type mismatch: expected 'i32', but provided 'f32'}}
248+
%0 = spirv.FunctionCall @f_type_mismatch(%arg0, %arg0) : (i32, i32) -> f32
249+
spirv.ReturnValue %cst: i32
250+
}
251+
}
252+
253+
// -----
254+
213255
spirv.module Logical GLSL450 {
214256
spirv.func @f_foo(%arg0 : i32, %arg1 : i32) -> i32 "None" {
215257
// expected-error @+1 {{op callee function 'f_undefined' not found in nearest symbol table}}

0 commit comments

Comments
 (0)