summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-05-20 17:48:26 +0000
committerDale Johannesen <dalej@apple.com>2010-05-20 17:48:26 +0000
commitd7d6638e3e822b266257371823d4c608a6747eaf (patch)
tree46ce5b55643976ecbffd18d8ffc2c9e64c7c3e68 /llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
parent37300481297224bda2ab9e609b51a70ab56af0fa (diff)
downloadbcm5719-llvm-d7d6638e3e822b266257371823d4c608a6747eaf.tar.gz
bcm5719-llvm-d7d6638e3e822b266257371823d4c608a6747eaf.zip
The PPC MFCR instruction implicitly uses all 8 of the CR
registers. Currently it is not so marked, which leads to VCMPEQ instructions that feed into it getting deleted. If it is so marked, local RA complains about this sequence: vreg = MCRF CR0 MFCR <kill of whatever preg got assigned to vreg> All current uses of this instruction are only interested in one of the 8 CR registers, so redefine MFCR to be a normal unary instruction with a CR input (which is emitted only as a comment). That avoids all problems. 7739628. llvm-svn: 104238
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCInstrInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
index ae95ae47712..1b7a7783b23 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
@@ -442,7 +442,8 @@ PPCInstrInfo::StoreRegToStackSlot(MachineFunction &MF,
// issue a MFCR to save all of the CRBits.
unsigned ScratchReg = TM.getSubtargetImpl()->isDarwinABI() ?
PPC::R2 : PPC::R0;
- NewMIs.push_back(BuildMI(MF, DL, get(PPC::MFCR), ScratchReg));
+ NewMIs.push_back(BuildMI(MF, DL, get(PPC::MFCRpseud), ScratchReg)
+ .addReg(SrcReg, getKillRegState(isKill)));
// If the saved register wasn't CR0, shift the bits left so that they are
// in CR0's slot.
OpenPOWER on IntegriCloud