[PATCH] D89451: [SystemZ] Mark unsaved argument R6 as live throughout function
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 15 15:54:03 PDT 2020
efriedma added a comment.
This seems like the right approach. It feels weird, but I can't think of anything better.
================
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.
----------------
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.
================
Comment at: llvm/test/CodeGen/SystemZ/frame-26.ll:6
+; Test that R6 when used for an argument is modelled as being live throughout
+; the function when not saved in the prologue..
+
----------------
Probably want an MIR testcase; smaller, and more likely to continue to hit the case in question in the future.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89451/new/
https://reviews.llvm.org/D89451
More information about the llvm-commits
mailing list