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

Ivan Butygin llvmlistbot at llvm.org
Fri Jul 11 07:27:33 PDT 2025


================
@@ -765,6 +765,37 @@ void mlir::spirv::AddressOfOp::getAsmResultNames(
   setNameFn(getResult(), specialName.str());
 }
 
+//===----------------------------------------------------------------------===//
+// spirv.EXTConstantCompositeReplicate
+//===----------------------------------------------------------------------===//
+
+LogicalResult spirv::EXTConstantCompositeReplicateOp::verify() {
+  Type valueType;
+  if (auto typedAttr = dyn_cast<TypedAttr>(getValue())) {
+    valueType = typedAttr.getType();
+  } else if (auto arrayAttr = dyn_cast<ArrayAttr>(getValue())) {
+    auto elementType = dyn_cast<TypedAttr>(arrayAttr[0]).getType();
----------------
Hardcode84 wrote:

Here and few other places are still missing `dyn_cast` checks

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


More information about the Mlir-commits mailing list