[Mlir-commits] [mlir] [mlir][spirv] Add definition for GL Length (PR #144041)

Igor Wodiany llvmlistbot at llvm.org
Mon Jun 16 08:11:22 PDT 2025


================
@@ -2490,3 +2490,24 @@ func.func @cannot_canonicalize_selection_op_4(%cond: i1) -> () {
   }
   spirv.Return
 }
+
+// -----
+
+//===----------------------------------------------------------------------===//
+// spirv.GL.Length
+//===----------------------------------------------------------------------===//
+
+// CHECK-LABEL: @convert_length_into_fabs_scalar
+func.func @convert_length_in_fabs_scalar(%arg0 : f32) -> f32 {
+
+  %0 = spirv.GL.Length %arg0 : f32 -> f32
+  //%11 = spirv.GL.Length %arg1 : vector<3xf32> -> f32
----------------
IgWod-IMG wrote:

Sorry for that, on Friday I left it unfinished, and today I thought I finished it before the weekend and forgot to double check. Fixed now.

https://github.com/llvm/llvm-project/pull/144041


More information about the Mlir-commits mailing list