================
@@ -1125,6 +1130,19 @@ Register SparcTargetLowering::getRegisterByName(const 
char* RegName, LLT VT,
     .Case("g4", SP::G4).Case("g5", SP::G5).Case("g6", SP::G6).Case("g7", 
SP::G7)
     .Default(0);
 
+  const SparcRegisterInfo *MRI = Subtarget->getRegisterInfo();
+  unsigned DwarfRegNum = MRI->getDwarfRegNum(Reg, false);
----------------
s-barannikov wrote:

It looks strange to check dwarf register numbers here. Why don't compare 
register ids directly? E.g.
`IsG = Reg >= SP::G0 && Reg <= SP::G7`.


https://github.com/llvm/llvm-project/pull/74927
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to