[PATCH] D127635: [AMDGPU] Work around GFX11 flat scratch SVS swizzling bug

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 06:00:53 PDT 2022


foad added a comment.

In D127635#3577604 <https://reviews.llvm.org/D127635#3577604>, @dstuttard wrote:

> I note that this includes global isel changes - but none of the tests are testing it?

Well spotted. The problem is that it's difficult or impossible to persuade globalisel to use the svs addressing mode in the first place, because it assumes that frame offsets are divergent so doesn't put them in an sgpr for us. See AMDGPURegisterBankInfo.cpp:

  case AMDGPU::G_FRAME_INDEX: {
    // TODO: This should be the same as other constants, but eliminateFrameIndex
    // currently assumes VALU uses.
    unsigned Size = MRI.getType(MI.getOperand(0).getReg()).getSizeInBits();
    OpdsMapping[0] = AMDGPU::getValueMapping(AMDGPU::VGPRRegBankID, Size);
    break;
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127635



More information about the llvm-commits mailing list