[Mlir-commits] [mlir] [mlir][SPIRV] Support Alignment and FuncParamAttr on parameters (PR #231069)

Arseniy Obolenskiy llvmlistbot at llvm.org
Wed Oct 14 02:22:57 PDT 2026


================
@@ -1106,12 +1163,34 @@ LogicalResult SPIRVDialect::verifyRegionArgAttribute(Operation *op,
     return success();
   Type argType = funcOp.getArgumentTypes()[argIndex];
 
+  if (attribute.getName() == spirv::getFuncParamAlignmentAttrName()) {
+    auto alignment = dyn_cast<IntegerAttr>(attribute.getValue());
+    if (!alignment || !alignment.getType().isSignlessInteger(32))
+      return op->emitError(
+          "'spirv.alignment' must be a 32-bit signless integer "
+          "attribute");
+    if (!isa<spirv::PointerType>(argType))
+      return op->emitError("'spirv.alignment' requires a pointer parameter");
----------------
aobolensk wrote:

and here

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


More information about the Mlir-commits mailing list