[llvm] [RISCV] Register fixed stack slots for callee saved registers for -ms… (PR #81392)

Visoiu Mistrih Francis via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 11 21:29:02 PST 2024


================
@@ -291,9 +291,7 @@ static Register getMaxPushPopReg(const MachineFunction &MF,
                                  const std::vector<CalleeSavedInfo> &CSI) {
   Register MaxPushPopReg = RISCV::NoRegister;
   for (auto &CS : CSI) {
-    // RISCVRegisterInfo::hasReservedSpillSlot assigns negative frame indices to
-    // registers which can be saved by Zcmp Push.
-    if (CS.getFrameIdx() < 0)
+    if (llvm::is_contained(AllPopRegs, CS.getReg().id()))
----------------
francisvm wrote:

Should we merge `AllPopRegs` and `FixedCSRFIMap`?

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


More information about the llvm-commits mailing list