AMDGPU/GlobalISel: Use destination register bank in applyMappingLoad
authorPetar Avramovic <Petar.Avramovic@amd.com>
Mon, 10 May 2021 08:16:09 +0000 (10:16 +0200)
committerPetar Avramovic <Petar.Avramovic@amd.com>
Mon, 10 May 2021 08:18:30 +0000 (10:18 +0200)
commitf6985a197ef9065a64d0bb819bfd90d1862da45b
tree26ea7051a92cbc16f2c5fce225d74ff2eb9d0846
parentd13ce17bb4008b2907e6e85882a9295dce9f6b0a
AMDGPU/GlobalISel: Use destination register bank in applyMappingLoad

Large loads on target that does not useFlatForGlobal have to be split
in regbankselect. This did not happen in case when destination had vgpr
bank and address had sgpr bank.
Instead of checking if address bank is sgpr check bank of the destination.

Differential Revision: https://reviews.llvm.org/D101992
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/load-constant.96.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/load-unaligned.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-uniform-load-noclobber.mir