[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 00:17:09 PST 2016
nemanjai added inline comments.
================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:845
@@ -844,3 +844,3 @@
MachineInstrBuilder MIB =
BuildMI(MBB, MBBI, dl, TII.get(PPC::MFCR8), TempReg);
for (unsigned i = 0, e = MustSaveCRs.size(); i != e; ++i)
----------------
Do we not want to do this if we're serializing the CR/LR save sequences (i.e. when the prologue has a single scratch register available)? Perhaps define MfcrOpcode above and use it here as well.
================
Comment at: test/CodeGen/PowerPC/crsave.ll:24
@@ -23,3 +23,3 @@
; PPC64: .cfi_startproc
-; PPC64: mfcr 12
+; PPC64: mfocrf 12
; PPC64: stw 12, 8(1)
----------------
Do we not know which CR field we need to save here?
http://reviews.llvm.org/D17749
More information about the llvm-commits
mailing list