diff options
author | Marek Olsak <marek.olsak@amd.com> | 2018-02-07 16:00:40 +0000 |
---|---|---|
committer | Marek Olsak <marek.olsak@amd.com> | 2018-02-07 16:00:40 +0000 |
commit | b2cc77985b1c02c08651e2547c094781e75343eb (patch) | |
tree | bb2779121825d6882b00dbfaaaeb02acfbbc6a55 /llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp | |
parent | b4e789e8f6aa62b628a41a73275aff95c9dd4389 (diff) | |
download | bcm5719-llvm-b2cc77985b1c02c08651e2547c094781e75343eb.tar.gz bcm5719-llvm-b2cc77985b1c02c08651e2547c094781e75343eb.zip |
AMDGPU: Remove the s_buffer workaround for GFX9 chips
Summary:
I checked the AMD closed source compiler and the workaround is only
needed when x3 is emulated as x4, which we don't do in LLVM.
SMEM x3 opcodes don't exist, and instead there is a possibility to use x4
with the last component being unused. If the last component is out of
buffer bounds and falls on the next 4K page, the hw hangs.
Reviewers: arsenm, nhaehnle
Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, llvm-commits, t-tye
Differential Revision: https://reviews.llvm.org/D42756
llvm-svn: 324486
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp index 65bb5f37133..26ba06a90ab 100644 --- a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp +++ b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp @@ -853,9 +853,8 @@ bool SILoadStoreOptimizer::optimizeBlock(MachineBasicBlock &MBB) { continue; } - if (STM->hasSBufferLoadStoreAtomicDwordxN() && - (Opc == AMDGPU::S_BUFFER_LOAD_DWORD_IMM || - Opc == AMDGPU::S_BUFFER_LOAD_DWORDX2_IMM)) { + if (Opc == AMDGPU::S_BUFFER_LOAD_DWORD_IMM || + Opc == AMDGPU::S_BUFFER_LOAD_DWORDX2_IMM) { // EltSize is in units of the offset encoding. CI.InstClass = S_BUFFER_LOAD_IMM; CI.EltSize = AMDGPU::getSMRDEncodedOffset(*STM, 4); |