Skip to content

Commit eaf00ee

Browse files
committed
Add CHECKs
1 parent 7a08d1f commit eaf00ee

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

mlir/test/Dialect/SPIRV/Transforms/canonicalize.mlir

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,16 +2498,17 @@ func.func @cannot_canonicalize_selection_op_4(%cond: i1) -> () {
24982498
//===----------------------------------------------------------------------===//
24992499

25002500
// CHECK-LABEL: @convert_length_into_fabs_scalar
2501-
func.func @convert_length_in_fabs_scalar(%arg0 : f32) -> f32 {
2502-
2501+
func.func @convert_length_into_fabs_scalar(%arg0 : f32) -> f32 {
2502+
//CHECK: spirv.GL.FAbs {{%.*}} : f32
2503+
//CHECK-NOT: spirv.GL.Length
25032504
%0 = spirv.GL.Length %arg0 : f32 -> f32
2504-
//%11 = spirv.GL.Length %arg1 : vector<3xf32> -> f32
25052505
spirv.ReturnValue %0 : f32
25062506
}
25072507

25082508
// CHECK-LABEL: @dont_convert_length_into_fabs_vec
2509-
func.func @dont_convert_length_in_fabs_vec(%arg0 : vector<3xf32>) -> f32 {
2510-
2509+
func.func @dont_convert_length_into_fabs_vec(%arg0 : vector<3xf32>) -> f32 {
2510+
//CHECK: spirv.GL.Length {{%.*}} : vector<3xf32> -> f32
2511+
//CHECK-NOT: spirv.GL.FAbs
25112512
%0 = spirv.GL.Length %arg0 : vector<3xf32> -> f32
25122513
spirv.ReturnValue %0 : f32
25132514
}

0 commit comments

Comments
 (0)