[PATCH] D91308: AMDGPU: Split large offsets when selecting global saddr mode
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 06:41:51 PST 2020
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:1847
ImmOffset = COffsetVal;
+ } else if (!LHS->isDivergent()) {
+ SDLoc SL(N);
----------------
I would add `&& COffsetVal >= 0`. I don't think there's any point trying this for large negative offsets, because it will always fail at the `isUint<32>` check below. That will simplify the code because you don't need to bother with the "signed division by a power of two" thing.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91308/new/
https://reviews.llvm.org/D91308
More information about the llvm-commits
mailing list