diff options
author | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2025-07-24 13:22:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-24 13:22:50 -0700 |
commit | 96e5eed92af267b151c29a95f2c208f2bc0a32b3 (patch) | |
tree | a9cd2c189bcfe3b6076288677a5c15c8e9e66455 /llvm/lib/Target/AMDGPU/GCNSubtarget.h | |
parent | 7884c077ffda1efbff7443d4b3a8e6c163b44509 (diff) | |
download | llvm-96e5eed92af267b151c29a95f2c208f2bc0a32b3.zip llvm-96e5eed92af267b151c29a95f2c208f2bc0a32b3.tar.gz llvm-96e5eed92af267b151c29a95f2c208f2bc0a32b3.tar.bz2 |
[AMDGPU] Select VMEM prefetch for llvm.prefetch on gfx1250 (#150493)
We have a choice to use a scalar or vector prefetch for an uniform
pointer. Since we do not have scalar stores our scalar cache is
practically readonly. The rw argument of the prefetch intrinsic is
used to force vector operation even for an uniform case. On GFX12
scalar prefetch will be used anyway, it is still useful but it will
only bring data to L2.
Diffstat (limited to 'llvm/lib/Target/AMDGPU/GCNSubtarget.h')
-rw-r--r-- | llvm/lib/Target/AMDGPU/GCNSubtarget.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/GCNSubtarget.h b/llvm/lib/Target/AMDGPU/GCNSubtarget.h index 4d76b79..88a269f 100644 --- a/llvm/lib/Target/AMDGPU/GCNSubtarget.h +++ b/llvm/lib/Target/AMDGPU/GCNSubtarget.h @@ -247,6 +247,7 @@ protected: bool HasInstFwdPrefetchBug = false; bool HasVmemPrefInsts = false; bool HasSafeSmemPrefetch = false; + bool HasSafeCUPrefetch = false; bool HasVcmpxExecWARHazard = false; bool HasLdsBranchVmemWARHazard = false; bool HasNSAtoVMEMBug = false; @@ -995,6 +996,8 @@ public: bool hasSafeSmemPrefetch() const { return HasSafeSmemPrefetch; } + bool hasSafeCUPrefetch() const { return HasSafeCUPrefetch; } + // Has s_cmpk_* instructions. bool hasSCmpK() const { return getGeneration() < GFX12; } |