[Mlir-commits] [mlir] [mlir][SPIR-V] Derive Aligned memory operand for PhysicalStorageBuffer in vector.load/store (PR #214200)
Igor Wodiany
llvmlistbot at llvm.org
Mon Oct 19 13:48:14 PDT 2026
================
@@ -845,19 +872,16 @@ struct VectorStoreOpConverter final
: spirv::BitcastOp::create(rewriter, loc, vectorPtrType,
accessChain);
- auto memoryAccess = spirv::MemoryAccess::None;
- spirv::MemoryAccessAttr memoryAccessAttr;
- IntegerAttr alignmentAttr;
- if (alignment.has_value()) {
- memoryAccess |= spirv::MemoryAccess::Aligned;
- memoryAccessAttr =
- spirv::MemoryAccessAttr::get(rewriter.getContext(), memoryAccess);
- alignmentAttr = rewriter.getI32IntegerAttr(alignment.value());
- }
+ auto memoryRequirements = calculateMemoryRequirements(
+ castedAccessChain, storeOp.getAlignment().value_or(0));
+ if (failed(memoryRequirements))
+ return rewriter.notifyMatchFailure(
+ storeOp, "failed to determine memory requirements");
----------------
IgWod wrote:
Could we have a negative test for this case?
https://github.com/llvm/llvm-project/pull/214200
More information about the Mlir-commits
mailing list