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

Jakub Kuderski llvmlistbot at llvm.org
Wed Jul 9 11:06:23 PDT 2025


================
@@ -165,6 +165,34 @@ func.func @coop_matrix_const_wrong_type() -> () {
 
 // -----
 
+//===----------------------------------------------------------------------===//
+// spirv.EXT.ConstantCompositeReplicate
+//===----------------------------------------------------------------------===//
+
+func.func @ccr_result_not_composite() -> () {
+  // expected-error @+1 {{op result #0 must be vector of bool or 8/16/32/64-bit integer or 16/32/64-bit float or BFloat16 values of length 2/3/4/8/16 or any SPIR-V array type or any SPIR-V runtime array type or any SPIR-V struct type or any SPIR-V cooperative matrix type or any SPIR-V matrix type, but got 'i32'}}
+  %0 = spirv.EXT.ConstantCompositeReplicate [1 : i32] : i32
+  return
+}
+
+// -----
+
+func.func @ccr_wrong_splat_type() -> () {
+  // expected-error @+1 {{expected splat element type'f32', but got: 'i32'}}
----------------
kuhar wrote:

missing space before the type
```suggestion
  // expected-error @+1 {{expected splat element type 'f32', but got: 'i32'}}
```

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


More information about the Mlir-commits mailing list