[PATCH] D93670: [AMDGPU][GlobalISel] GlobalISel for flat scratch

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 10:36:51 PST 2020


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:3644-3645
+
+  if (!isSGPR(SAddr))
+    return None;
+
----------------
arsenm wrote:
> rampitec wrote:
> > arsenm wrote:
> > > Should hoist this up?
> > The block above processes G_PTR_ADD and reassigns SAddrs. G_PTR_ADD produces VGPR but resulting register can end up SGPR.
> But the reassignment just creates an SGPR virt reg
It creates SGPR if all checks of G_PTR_ADD succeeded and it is proved uniform. If I move the check up we will have no chance to porcess G_PTR_ADD.


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

https://reviews.llvm.org/D93670



More information about the llvm-commits mailing list