[clang-tools-extra] [flang] [clang] [llvm] [compiler-rt] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

Qiu Chaofan via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 4 22:42:56 PST 2023


================
@@ -2607,6 +2658,11 @@ bool PPCFrameLowering::restoreCalleeSavedRegisters(
   unsigned CSIIndex = 0;
   BitVector Restored(TRI->getNumRegs());
 
+  Register MergeFrom = PPC::R31;
+  if (EnableLoadStoreMultiple && !Subtarget.isLittleEndian() &&
+      !Subtarget.isPPC64())
+    findContinuousLoadStore(CSI, MergeFrom);
----------------
ecnelises wrote:

`findContinuousLoadStore` returns void, so `MergeFrom < PPC::R31` means the functions returns correctly, right? If so, we may need a comment here to explain why it's R31.

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


More information about the cfe-commits mailing list