[all-commits] [llvm/llvm-project] 3181a6: [AMDGPU] Trim zero components from buffer and imag...

Mateja Marjanovic via All-commits all-commits at lists.llvm.org
Mon May 15 09:24:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3181a6e3e7dae9292782216a55c5e1f0583c1668
      https://github.com/llvm/llvm-project/commit/3181a6e3e7dae9292782216a55c5e1f0583c1668
  Author: Mateja Marjanovic <mailto:mmarjano at amd.com>
  Date:   2023-05-15 (Mon, 15 May 2023)

  Changed paths:
    M llvm/include/llvm/IR/IntrinsicsAMDGPU.td
    M llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
    M llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll
    A llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-simplify-image-buffer-stores.ll

  Log Message:
  -----------
  [AMDGPU] Trim zero components from buffer and image stores

For image and buffer stores the default behaviour on GFX11 and
older is to set all unset components to zero. So if we pass
only X component it will be the same as X000, or XY same as XY00.

This patch simplifies the passed vector of components in InstCombine
by removing zero components from the end.

For image stores it also trims DMask if necessary.

Reviewed By: foad, arsenm
Differential Revision: https://reviews.llvm.org/D146737




More information about the All-commits mailing list