AMDGPU: Implement waterfall loop for MIMG instructions with 256-bit SRsrc
authorChangpeng Fang <changpeng.fang@gmail.com>
Tue, 18 Aug 2020 23:27:36 +0000 (16:27 -0700)
committerChangpeng Fang <changpeng.fang@gmail.com>
Tue, 18 Aug 2020 23:27:36 +0000 (16:27 -0700)
commite7081d117a72aab2282d716c7ea44fed8d5cca56
tree8d68c2eb9ee7982400e91d5e6ab2cf18e3978dfd
parentd14cf45735b0d09d7d3caf0824779520dd20ef10
AMDGPU: Implement waterfall loop for MIMG instructions with 256-bit SRsrc

Summary:
  When the resource descriptor is of vgpr, we need a waterfall loop
to read into a sgpr. In this patchm we generalized the  implementation
to work for any regster class sizes, and extend the work to MIMG
instructions.

Fixes: SWDEV-223405

Reviewers:
  arsenm, nhaehnle

Differential Revision:
  https://reviews.llvm.org/D82603
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/test/CodeGen/AMDGPU/image-sample-waterfall.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/mubuf-legalize-operands.ll
llvm/test/CodeGen/AMDGPU/mubuf-legalize-operands.mir
llvm/test/CodeGen/AMDGPU/vgpr-tuple-allocation.ll