[Mlir-commits] [mlir] [mlir][spirv] Retain nontemporal attribute when converting memref load/store (PR #82119)
Lei Zhang
llvmlistbot at llvm.org
Sun Feb 25 16:36:42 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");
+ if (nontemporalAttr && nontemporalAttr.getValue()) {
+ return std::pair{
----------------
antiagainst wrote:
Note that the `Nontemporal` is a bit in the bitfield--it should be or-ed together with the `Aligned` bit calculuated in the below--as it's implemented right now, this breaks the logic for alignment calculation.
We need to have a test on this (nontemporal + aligned) to check it.
https://github.com/llvm/llvm-project/pull/82119
More information about the Mlir-commits
mailing list