[Mlir-commits] [mlir] [mlir][spirv][memref] Calculate alignment for `PhysicalStorageBuffer`s (PR #80243)

Jakub Kuderski llvmlistbot at llvm.org
Thu Feb 1 15:29:16 PST 2024


================
@@ -508,11 +568,15 @@ IntLoadOpPattern::matchAndRewrite(memref::LoadOp loadOp, OpAdaptor adaptor,
   assert(accessChainOp.getIndices().size() == 2);
   Value adjustedPtr = adjustAccessChainForBitwidth(typeConverter, accessChainOp,
                                                    srcBits, dstBits, rewriter);
-  Value spvLoadOp = rewriter.create<spirv::LoadOp>(
-      loc, dstType, adjustedPtr,
-      loadOp->getAttrOfType<spirv::MemoryAccessAttr>(
-          spirv::attributeName<spirv::MemoryAccess>()),
-      loadOp->getAttrOfType<IntegerAttr>("alignment"));
----------------
kuhar wrote:

Both must be present at the same time in SPIR-V

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


More information about the Mlir-commits mailing list