[Mlir-commits] [mlir] [mlir][spirv] Add basic support for SPV_EXT_replicated_composites (PR #147067)

Jakub Kuderski llvmlistbot at llvm.org
Fri Jul 4 07:48:55 PDT 2025


================
@@ -135,6 +135,52 @@ def SPIRV_ConstantOp : SPIRV_Op<"Constant",
   let autogenSerialization = 0;
 }
 
+
+// -----
+
+def SPIRV_EXTConstantCompositeReplicateOp : SPIRV_ExtVendorOp<"ConstantCompositeReplicate", [Pure]> {
+  let summary = [{
+    Declare a new replicated composite constant op.
+  }];
+
+  let description = [{
+    This op declares a `spiv.EXT.ConstantCompositeReplicate` which represents a
+    splat composite constant i.e. all element of composite constant have the
+    same value. This op will be serialized to SPIR-V `OpConstantCompositeReplicateEXT`.
----------------
kuhar wrote:

I think we can make this more concise:
```suggestion
    Represents a splat composite constant i.e., all element of composite constant have the
    same value.
```

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


More information about the Mlir-commits mailing list