[llvm] [PowerPC] Utilize `getReservedRegs` to find asm clobberable registers. (PR #99766)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 01:49:25 PDT 2024


================
@@ -2762,7 +2762,7 @@ void PPCFrameLowering::updateCalleeSaves(const MachineFunction &MF,
     // Get the lowest numbered register for each class that actually needs
     // to be saved.
     MCPhysReg Cand = CSRegs[i];
-    if (!SavedRegs.test(Cand))
+    if (!SavedRegs.test(Cand) || Cand == PPC::X2)
----------------
EsmeYi wrote:

I will remove the change, because X2 is put before X14 in latest commit, so if X2 is used, all registers 14-31 must be saved/restored. Is it right?

https://github.com/llvm/llvm-project/pull/99766


More information about the llvm-commits mailing list