[PATCH] D89451: [SystemZ] Mark unsaved argument R6 as live throughout function

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 01:57:06 PDT 2020


uweigand added inline comments.


================
Comment at: llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp:356
+  if (MF.front().isLiveIn(SystemZ::R6D) && LowGPR &&
+      SystemZMC::getFirstReg(LowGPR) > SystemZMC::getFirstReg(SystemZ::R6D)) {
+    // Clear any kill flags.
----------------
efriedma wrote:
> Not sure I understand what the `LowGPR && SystemZMC::getFirstReg(LowGPR) > SystemZMC::getFirstReg(SystemZ::R6D)` is doing.  We should be checking whether the register was spilled in the prologue.
That's exactly what this check does: we use a STORE MULTIPLE instruction to spill the range of registers from LowGPR up to r15.  So "LowGPR > r6" is equivalent to "r6 is not spilled in the prologue".


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

https://reviews.llvm.org/D89451



More information about the llvm-commits mailing list