[InstCombine][AMDGPU] Trim components of s_buffer_load
authorPiotr Sobczak <Piotr.Sobczak@amd.com>
Fri, 20 Dec 2019 20:06:19 +0000 (21:06 +0100)
committerPiotr Sobczak <Piotr.Sobczak@amd.com>
Thu, 30 Jan 2020 09:48:25 +0000 (10:48 +0100)
commitdd7148822bdc640f3a21a750e94b1fac0050d065
tree83f2f1b766dd4f2480da03ccf2f759bdbd5ad6bb
parent021f531786df4a21c67eb7b238b97a84263e36c7
[InstCombine][AMDGPU] Trim components of s_buffer_load

Summary:
Add trimming of unused components of s_buffer_load.

For s_buffer_load and unformatted buffer_load also trim unused
components at the beginning of vector and update offset accordingly.

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71785
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-demanded-vector-elts.ll