[PATCH] D105062: [AMDGPU] Reduce AGPR to AGPR copies with same source

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 10:23:59 PDT 2021


rampitec added a comment.

In D105062#2850276 <https://reviews.llvm.org/D105062#2850276>, @vangthao wrote:

>   %80:vgpr_32 = COPY %12:sgpr_32
>   %81:agpr_32 = V_ACCVGPR_WRITE_B32_e64 %80:vgpr_32, implicit $exec
>   %70:areg_1024 = REG_SEQUENCE %81:agpr_32, %subreg.sub0, %81:agpr_32, %subreg.sub1, %81:agpr_32 ...
>
> I agree this does seem to be the culprit so we would need to catch it between this pass and register allocation. However, I'm not sure which pass in-between those two should have the responsibility of catching this or whether there should be a new pass to handle this.

It looks like a special case where we splat an sgpr into an areg... What will happen if we catch it in FixSGPRCopies and keep reg_sequence initializing areg directly from the sgpr?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105062/new/

https://reviews.llvm.org/D105062



More information about the llvm-commits mailing list