[PATCH] D91308: AMDGPU: Split large offsets when selecting global saddr mode
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 16:48:29 PST 2020
rampitec added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:1843
// TODO: Could split larger constant into VGPR offset.
if (TII->isLegalFLATOffset(COffsetVal, AMDGPUAS::GLOBAL_ADDRESS, true)) {
----------------
This todo is not relevant anymore.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:1849
+ SDLoc SL(N);
+ // saddr + large_offset -> saddr + (voffset = large_offset & ~MaxOffset) +
+ // (large_offset & MaxOffset);
----------------
If you have several consequtive loads this logic will result in reinitialization of vaddr before each load. You could probably mask few low bits in MaxOffset for this purpose to create a window of instructions which can use the same base registers.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91308/new/
https://reviews.llvm.org/D91308
More information about the llvm-commits
mailing list