[PATCH] D58905: [AMDGPU] Use three- and five-dword result type in image ops

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 07:17:16 PST 2019


tpr created this revision.
Herald added subscribers: llvm-commits, t-tye, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl, arsenm.
Herald added a project: LLVM.

Some image ops return three or five dwords.  Previously, we modeled that
with a 4 or 8 dword register class.  The register allocator could
cleverly spot that some subregs were dead and allocate something else
there, but that caused the de-optimization that waitcnt insertion would
think that the result was used immediately.

This commit allows such an image op to have a result with a three or
five dword result, avoiding the above de-optimization.

Change-Id: I3651211bbd7ed22721ee7b9fefd7bcc60a809d8b


Repository:
  rL LLVM

https://reviews.llvm.org/D58905

Files:
  lib/Target/AMDGPU/MIMGInstructions.td
  lib/Target/AMDGPU/SIISelLowering.cpp
  test/CodeGen/AMDGPU/llvm.amdgcn.image.dim.ll
  test/CodeGen/AMDGPU/llvm.amdgcn.image.load.a16.ll
  test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.dim.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58905.189147.patch
Type: text/x-patch
Size: 12236 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190304/a11c93bb/attachment-0001.bin>


More information about the llvm-commits mailing list