[PATCH] D45524: Fix incorrect choice of callee-saved registers save/restore points
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 15 04:19:08 PDT 2018
thegameg accepted this revision.
thegameg added a comment.
This revision is now accepted and ready to land.
Thanks. LGTM + one more comment.
================
Comment at: lib/CodeGen/ShrinkWrap.cpp:271
"Unallocated register?!");
- UseOrDefCSR = RCI.getLastCalleeSavedAlias(PhysReg);
+ UseOrDefCSR = (!MI.isCall() && PhysReg == SP) || RCI.getLastCalleeSavedAlias(PhysReg);
} else if (MO.isRegMask()) {
----------------
Can you please add a comment explaining why we skip SP here?
https://reviews.llvm.org/D45524
More information about the llvm-commits
mailing list