Skip to content

Commit 736e5a8

Browse files
committed
Arg size mismatch test
1 parent 9cdee79 commit 736e5a8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mlir/test/Dialect/SPIRV/IR/gl-ops.mlir

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,14 @@ func.func @distance_invalid_type(%arg0 : i32, %arg1 : i32) {
570570

571571
// -----
572572

573+
func.func @distance_arg_mismatch(%arg0 : vector<3xf32>, %arg1 : vector<4xf32>) {
574+
// expected-error @+1 {{'spirv.GL.Distance' op failed to verify that all of {p0, p1} have same type}}
575+
%0 = spirv.GL.Distance %arg0, %arg1 : vector<3xf32>, vector<4xf32> -> f32
576+
return
577+
}
578+
579+
// -----
580+
573581
func.func @distance_invalid_vector_size(%arg0 : vector<5xf32>, %arg1 : vector<5xf32>) {
574582
// expected-error @+1 {{'spirv.GL.Distance' op operand #0 must be 16/32/64-bit float or vector of 16/32/64-bit float values of length 2/3/4/8/16}}
575583
%0 = spirv.GL.Distance %arg0, %arg1 : vector<5xf32>, vector<5xf32> -> f32

0 commit comments

Comments
 (0)