[PATCH] D91308: AMDGPU: Split large offsets when selecting global saddr mode

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 11 17:14:10 PST 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:1849
+      SDLoc SL(N);
+      // saddr + large_offset -> saddr + (voffset = large_offset & ~MaxOffset) +
+      //                         (large_offset & MaxOffset);
----------------
rampitec wrote:
> 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.
I copied this from the new splitting logic in 760af7a0743278b6dd7782b177f4d6d086c726e0.

This won't be re-initialized since in the common case the common base part will CSE


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

https://reviews.llvm.org/D91308



More information about the llvm-commits mailing list