[all-commits] [llvm/llvm-project] b8d199: [AMDGPU] Add A16/G16 to InstCombine

Sebastian Neubauer via All-commits all-commits at lists.llvm.org
Thu Aug 20 01:52:35 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b8d19947782057671b0afd194116b153ccdf2c6d
      https://github.com/llvm/llvm-project/commit/b8d19947782057671b0afd194116b153ccdf2c6d
  Author: Sebastian Neubauer <sebastian.neubauer at amd.com>
  Date:   2020-08-20 (Thu, 20 Aug 2020)

  Changed paths:
    M llvm/include/llvm/IR/IntrinsicsAMDGPU.td
    M llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.h
    M llvm/lib/Target/AMDGPU/MIMGInstructions.td
    A llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics-gfx8.ll
    M llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll

  Log Message:
  -----------
  [AMDGPU] Add A16/G16 to InstCombine

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.

Differential Revision: https://reviews.llvm.org/D85887




More information about the All-commits mailing list