[PATCH] D85887: [AMDGPU] Add A16/G16 to InstCombine

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 03:03:08 PDT 2020


Flakebi created this revision.
Flakebi added reviewers: arsenm, nhaehnle.
Herald added subscribers: llvm-commits, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: LLVM.
Flakebi requested review of this revision.
Herald added a subscriber: wdng.

When sampling from images with coordinates that only have 16 bit
accuracy, convert the image intrinsic call to use a16 or g16.
This does only happen if the target hardware supports it.

An alternative would be to always apply this combination, independent of
the target hardware and extend 16 bit arguments to 32 bit arguments
during legalization. To me, this sounds like an unnecessary roundtrip
that could prevent some further InstCombine optimizations.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85887

Files:
  llvm/include/llvm/IR/IntrinsicsAMDGPU.td
  llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
  llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.h
  llvm/lib/Target/AMDGPU/MIMGInstructions.td
  llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85887.285299.patch
Type: text/x-patch
Size: 84715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200813/c47adb77/attachment.bin>


More information about the llvm-commits mailing list