[PATCH] D63803: [PowerPC] Move TOC save to prologue when profitable

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 5 11:39:07 PDT 2019


nemanjai marked 2 inline comments as done.
nemanjai added inline comments.
Herald added subscribers: wuzish, MaskRay.


================
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) ||
----------------
hfinkel wrote:
> The point of this is that, if we have R2 here, we'll hit the llvm_unreachable below? Can you write an assert instead?
That's a good point. I'll change it on the commit.


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