[PATCH] D17749: [PPC64] Use mfocrf in prologue when we only need to save 1 nonvolatile CR field

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 04:23:48 PST 2016


nemanjai added inline comments.

================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:849
@@ -844,3 +848,3 @@
     MachineInstrBuilder MIB =
-      BuildMI(MBB, MBBI, dl, TII.get(PPC::MFCR8), TempReg);
+      BuildMI(MBB, MBBI, dl, TII.get(MfcrOpcode), TempReg);
     for (unsigned i = 0, e = MustSaveCRs.size(); i != e; ++i)
----------------
Yes. When we sink the prologue into the function for shrink wrapping and the BB has only one available register we use that register to save both the CR and the LR.


http://reviews.llvm.org/D17749





More information about the llvm-commits mailing list