arsenm added inline comments.

================
Comment at: llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp:191-199
+  MCRegister RepReg;
+  for (MCRegister R : *MRI->getRegClass(Reg)) {
+    if (!MRI->isReserved(R)) {
+      RepReg = R;
+      break;
+    }
+  }
----------------
rampitec wrote:
> arsenm wrote:
> > This is a problem because I've removed forAllLanes.
> > 
> > This is a hack, we should be using a different register class for cases 
> > that don't support a given subregister index not scanning for an example 
> > non-reserved register
> This would be massive duplication of all instructions with such operands, 
> isn't it?
Ideally yes. We can still use register classes for this, with special care to 
make sure we never end up with the unaligned virtual registers in the wrong 
contexts.

 The less that's tracked by the instruction definitions, the more special case 
code we have to right. I've been thinking of swapping out the entire 
MCInstrDesc table per-subtarget to make this easier, although that may be a 
painful change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96906

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to