[PATCH] D78772: [AMDGPU] Adapt GCNRegBankReassign for 16 bit subregs
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 24 16:48:58 PDT 2020
rampitec marked an inline comment as done.
rampitec added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:1789-1790
+ const TargetRegisterClass *RC = getPhysRegClass(Reg);
+ if (getRegSizeInBits(*RC) != 16)
+ return Reg;
+
----------------
arsenm wrote:
> rampitec wrote:
> > arsenm wrote:
> > > Seems like this should just be an assert
> > I am going to use it without checking is a register actually 16 or 32 bit, just to get a 32 bit operand from whatever input. But it is reasonable to add assert for "Size <= 32".
> I think you can get away with looking up the specific register class, and picking the right 32-bit class by just trying VGPR,SGPR,AGPR in succession and see if any succeed
I could but I don't think it is faster.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78772/new/
https://reviews.llvm.org/D78772
More information about the llvm-commits
mailing list