[PATCH] D78591: [AMDGPU] Define special SGPR subregs

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 17:21:14 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:266-267
 
+  for (auto Reg : AMDGPU::SReg_32RegClass) {
+    Reserved.set(getSubReg(Reg, AMDGPU::hi16));
+    Register Low = getSubReg(Reg, AMDGPU::lo16);
----------------
rampitec wrote:
> rampitec wrote:
> > arsenm wrote:
> > > Can't you just iterate SGPR_16LO and use reserveRegisterTuples?
> > This will reserve all SGPRs, not saying that it will reserve SGPR_LO16 which is needed to be used.
> Also the point is this is mostly not about SGPR, this is about SReg. Stuff like vcc_lo_hi16. Without reserving verifier complains about missing live-ins in some basic blocks.
I mean I would expect there to be an SReg_16LO too 


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

https://reviews.llvm.org/D78591





More information about the llvm-commits mailing list