[Mlir-commits] [mlir] [mlir][spirv] Retain nontemporal attribute when converting memref load/store (PR #82119)

Artem Tyurin llvmlistbot at llvm.org
Sun Feb 18 03:33:48 PST 2024


================
@@ -481,6 +481,14 @@ calculateRequiredAlignment(Value accessedPtr, Operation *memrefAccessOp) {
   assert((isa<memref::LoadOp, memref::StoreOp>(memrefAccessOp)) &&
          "Bad op type");
 
+  auto nontemporalAttr = memrefAccessOp->getAttrOfType<BoolAttr>("nontemporal");
----------------
agentcooper wrote:

As this function takes `Operation *` to allow both load and store, this seems to be the most convenient way to access the attribute. I can extract `"nontemporal"` string as a constant if you can suggest a good place for it. Or would you prefer casting to `memref::LoadOp`/`memref::StoreOp` instead?

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


More information about the Mlir-commits mailing list