[llvm] [AMDGPU] Handle nontemporal and amdgpu.last.use metadata in amdgpu-lower-buffer-fat-pointers (PR #120139)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 05:01:37 PST 2025


================
@@ -1074,18 +1074,6 @@ Value *SplitPtrStructs::handleMemoryInst(Instruction *I, Value *Arg, Value *Ptr,
   Args.push_back(IRB.getInt32(0));
 
   uint32_t Aux = 0;
-  bool IsInvariant =
-      (isa<LoadInst>(I) && I->getMetadata(LLVMContext::MD_invariant_load));
-  bool IsNonTemporal = I->getMetadata(LLVMContext::MD_nontemporal);
----------------
jayfoad wrote:

IsNonTemporal should be handled post-isel by SIMemoryLegalizer, which sets bits in the aux (aka `cpol`) operand based on flags in the MachineMemOperand. It also knows how to do it properly for different architectures, which this code does not - e.g. the meaning of the aux bits changes completely in GFX12.

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


More information about the llvm-commits mailing list