[PATCH] D63803: [PowerPC] Move TOC save to prologue when profitable
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 3 19:11:26 PDT 2019
hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.
One question below, but otherwise, LGTM.
================
Comment at: llvm/lib/Target/PowerPC/PPCFrameLowering.cpp:1874
unsigned Reg = CSI[i].getReg();
- if (PPC::GPRCRegClass.contains(Reg) ||
- PPC::SPE4RCRegClass.contains(Reg)) {
+ bool IgnoreR2 = MustSaveTOC && (Reg == PPC::X2 || Reg == PPC::R2);
+ if (!IgnoreR2 && (PPC::GPRCRegClass.contains(Reg) ||
----------------
The point of this is that, if we have R2 here, we'll hit the llvm_unreachable below? Can you write an assert instead?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63803/new/
https://reviews.llvm.org/D63803
More information about the llvm-commits
mailing list