[PATCH] D110053: [AMDGPU] Add a regclass flag for scalar registers

Christudasan Devadasan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 20 19:37:51 PDT 2021


cdevadas added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp:1173
     if (Desc.OpInfo[I].RegClass == -1 ||
-        !TRI->isVGPRClass(TRI->getRegClass(Desc.OpInfo[I].RegClass)))
+        !TRI->isVSSuperClass(TRI->getRegClass(Desc.OpInfo[I].RegClass)))
       continue;
----------------
rampitec wrote:
> Why do you need to change this?
I assumed that check is specifically for VS_32/VS_64 classes. Isn't it the case?


================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.td:138
+  // TODO: This flag is currently set for all regclasses other than vectors.
+  // Some of them aren't truly GPRs, TTMP for instance. It won't be a problem
+  // as long as they remain unallocatable.
----------------
rampitec wrote:
> TTMP is scalar.
I will use another reference.


================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.td:794
   let HasVGPR = 1;
+  let HasSGPR = 1;
 }
----------------
rampitec wrote:
> It does not have SGPRs.
I tried to associate them with the closest regtype (either VGPR or SGPR). 
I can remove it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110053



More information about the llvm-commits mailing list