[PATCH] D37850: AMDGPU: Split MUBUF offset into aligned components

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 14 06:19:44 PDT 2017


nhaehnle created this revision.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, wdng, kzhuravl.

Atomic buffer operations do not work (and trap on gfx9) when the
components are unaligned, even if their sum is aligned.

Previously, we generated an offset of 4156 without an SGPR by
splitting it as 4095 + 61 (immediate + inline constant). The
highest offset for which we can do this correctly is 4152 = 4092 + 60.

Fixes dEQP-GLES31.functional.ssbo.atomic.*


https://reviews.llvm.org/D37850

Files:
  lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
  test/CodeGen/AMDGPU/llvm.amdgcn.buffer.atomic.ll
  test/CodeGen/AMDGPU/llvm.amdgcn.buffer.load.format.ll
  test/CodeGen/AMDGPU/llvm.amdgcn.buffer.load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37850.115209.patch
Type: text/x-patch
Size: 9208 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170914/a0df8fc3/attachment.bin>


More information about the llvm-commits mailing list