[PATCH] D143263: AMDGPU: Ensure flat loads are broken into dword in functions

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 05:47:34 PST 2023


arsenm created this revision.
arsenm added reviewers: rampitec, AMDGPU, Pierre-vh, foad.
Herald added subscribers: kosarev, StephenFan, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

We were assuming we could rely on the flat scratch init detection
to imply if there are possible flat addressed stack objects, which
doesn't work outside of a kernel. We should have a way to prove
if a given flat access can't access the stack.

      

We could use a not-stack parameter attribute to avoid
these splits.

      

Make the minimally correct change for GlobalISel; I'll address
this better in my larger patch to rewrite load and store legalization.

      

Fixes: SWDEV-218237


https://reviews.llvm.org/D143263

Files:
  llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
  llvm/lib/Target/AMDGPU/SIISelLowering.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-flat.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.atomic.dec.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.atomic.inc.ll
  llvm/test/CodeGen/AMDGPU/flat-address-space.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143263.494595.patch
Type: text/x-patch
Size: 265060 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230203/834aa887/attachment-0001.bin>


More information about the llvm-commits mailing list